angles
2.1.1, released 5 years ago by an unverified publisher
Provides a type-safe Angle class for degrees, radians, gradians and turns with conversion and trig helpers.
What it does
The package defines an Angle type that can be created from various units and accessed in any unit. It includes common trigonometric functions, arithmetic operators and utility methods like normalization and approximation.
AI-written summary of version 2.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need clear, unit‑safe angle handling in Dart code
- You want built‑in trig functions without manual conversions
Skip it when
- You require full 2D/3D geometry libraries
- You need advanced graphics or physics engines
Strengths
- Eliminates manual unit conversion errors
- Rich API with constructors, accessors, trig and arithmetic
Weaknesses
- Focused only on angles, no broader geometry support
- Small ecosystem, no additional utilities
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:angles/angles.dart';
void main(){
var a0 = Angle.degrees(180.0);
var a1 = Angle.radians(math.pi);
var a2 = Angle.turns(0.5);
print(a0.degrees); // 180.0
print(a1.radians); // 3.1415...
print(a2.turns); // 0.5
}Alternatives
Packages that do the same job and could replace angles.
- gtk
GTK utilities for Flutter Linux applications, providing settings and application lifecycle helpers.
76Compare - mime
Utilities to resolve MIME types from file names, magic bytes, and to parse multipart streams.
92Compare - flutter_flavorizr
A utility to easily create and configure application flavors in Flutter.
86Compare - namefully
A Dart utility for handling, formatting, and validating person names.
46Compare