Angle class
Canonical mathematical concept of an "angle".
The opening between two rays. An Angle
exists within the range
(-360°, 360°). A new Angle
produced from an existing Angle
by
adding, subtracting, dividing, multiplying, etc. will be limited to the
the aforementioned range. To represent angles beyond 360°, see Rotation
.
- Available Extensions
Constructors
- Angle.fromDegrees(num degrees)
-
Constructs a new
Angle
from the givendegrees
.const - Angle.fromPercent(double percent)
-
Constructs a new
Angle
from the givenpercent
.const - Angle.fromRadians(num radians)
-
Constructs a new
Angle
from the givenradians
.const
Properties
- category → AngleCategory
-
This
Angle
s category, e.g., acute, obtuse, or reflexive.no setter - complement → Angle
-
Converts a non-reflexive
Angle
to its reflexive complement, or a reflexiveAngle
to its non-reflexive complement, e.g., 90° -> 270° or 270° -> 90°.no setter - degrees → num
-
Angle expressed as degrees.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isAcute → bool
-
True if this
Angle
is acute, i.e., in [0°, 90°).no setter - isNegative → bool
-
True if this
Angle
is less than zero.no setter - isObtuse → bool
-
True if this
Angle
is obtuse, i.e., in [90°, 180°).no setter - isPositive → bool
-
True if this
Angle
is greater than or equal to zero.no setter - isReflexive → bool
-
True if this
Angle
is reflexive, i.e., in [180°, 360°).no setter - percent → num
-
Angle expressed as a percentage.
final
- radians → num
-
Angle expressed as radians.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isApproximately(
Angle other, {num percentVariance = 0.01}) → bool -
isEquivalentTo(
Angle other) → bool -
makeNegative(
) → Angle -
Returns a negative version of this
Angle
. -
makePositive(
) → Angle -
Returns a positive version of this
Angle
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rotate(
Angle other) → Rotation -
Adds the
other
Angle
to thisAngle
, producing aRotation
. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator *(
num scalar) → Angle -
Multiplies this
Angle
by the given scalar. -
operator +(
Angle other) → Angle -
Adds two
Angle
s together, producing a newAngle
. -
operator -(
Angle other) → Angle -
Subtracts the
other
Angle
from thisAngle
, producing a newAngle
. -
operator /(
num scalar) → Angle -
Divides this
Angle
by the given scalar. -
operator ==(
Object other) → bool -
The equality operator.
override
-
operator unary-(
) → Angle -
Returns a new
Angle
, which is the same as thisAngle
but in the opposite direction.