Angle.inUnits constructor
Angle.inUnits(
- dynamic value,
- AngleUnits? units, [
- double uncert = 0.0
Constructs an Angle based on the value
and the conversion factor intrinsic to the passed units
.
Unlike other Quantity subclasses, the Angle constructor requires both value and units to be provided. This is to avoid any confusion between radians and degrees, which is a common source of programming errors.
The dimension is set to the static angleDimensions parameter.
The internal value is automatically bounded between -PI and PI radians (-180 to 180 degrees)
Implementation
Angle.inUnits(dynamic value, AngleUnits? units, [double uncert = 0.0])
: super(value, units ?? Angle.radians, uncert);