AngleRange class
An immutable angle range with a start angle, an end angle and an implicit direction.
- Inheritance
-
- Object
- QuantityRange<
Angle> - AngleRange
Constructors
- AngleRange(Angle startAngle, Angle endAngle)
- Constructs an angle range.
- AngleRange.degrees(double startAngleDeg, double endAngleDeg)
- Constructs an angle range in degrees.
- AngleRange.radians(double startAngleRad, double endAngleRad)
- Constructs an angle range in radians.
Properties
- centerValue → Angle
-
The value at the center of the range.
no setterinherited
- delta → Angle
-
The change in value from start to end, which may be negative.
no setteroverride
- endAngle → Angle
-
The ending angle in the range.
no setter
- hashCode → int
-
Two equal quantity ranges will have the same hash code.
no setterinherited
- isAnticlockwise → bool
-
True if the range represents a anticlockwise direction.
no setter
- isClockwise → bool
-
True if the range represents a clockwise direction.
no setter
- isCounterclockwise → bool
-
True if the range represents a counterclockwise direction.
no setter
- maxValue → Angle
-
The maximum value in this range.
no setterinherited
- minValue → Angle
-
The minimum value in this range.
no setterinherited
- q1 ↔ Angle
-
The starting quantity of the range.
getter/setter pairinherited
- q2 ↔ Angle
-
The ending quantity of the range.
getter/setter pairinherited
-
ranges360
→ List<
AngleRange> -
Returns the equivalent range(s) projected onto the 0-360 degree circle.
no setter
- revolutions → int
-
The number of full revolutions encompassed by the range.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- span → Angle
-
The magnitude of the range.
This value is always positive (or zero). Get delta for the signed version of the range.
no setterinherited
- startAngle → Angle
-
The starting angle in the range.
no setter
Methods
-
angleClosestTo(
Angle angle, [bool strict = false]) → Angle -
Find the angle within this range closest to the specified
angle
. -
contains(
Angle quantity, [bool inclusive = true, double epsilon = 1.0e-10]) → bool -
True if this range contains
quantity
, with a tolerance,epsilon
, of rounding errors of 1.0e-10 andinclusive
of the endpoints by default.inherited -
contains360(
Angle angle, [bool inclusive = true, double epsilon = 1.0e-10]) → bool -
True if this range, projected onto the 0-360 degree circle
contains
angle
when it also is projected onto the 0-360 circle. -
deriveRange(
{double? rotate, double? scale, bool? reverse}) → AngleRange - Derive a AngleRange from this one by applying one or more transforms.
-
encompasses(
QuantityRange< Angle> range2) → bool -
True only if this range completely encompasses range2.
inherited
-
isTiny(
{Angle? epsilon}) → bool -
A range is considered tiny if its width is less than or equal to
epsilon
, which is 0.001 degree by default. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
overlaps(
QuantityRange< Angle> range2) → bool -
Returns true if this range overlaps
range2
(exclusive of the endpoints).inherited -
overlaps360(
AngleRange range2) → bool -
Returns true if this angle range overlaps
range2
's angle range (exclusive of the endpoints). -
toString(
) → String -
Returns a String representation of this range in the form '
inherited
Operators
-
operator ==(
Object obj) → bool -
Two quantity ranges are considered equal only if their endpoints are exactly equal.
inherited