PolarCoord class
Canonical mathematical concept of a "polar coordinate".
Polar coordinates are defined by an angle, and a distance from the origin,
e.g., (100, 45°). The distance is often referred to as the radius
.
Polar coordinates offer an alternative expression to positions other than Cartesian coordinates. Polar coordinates naturally lend themselves to radial problem spaces, e.g., clock and watch faces, radial progress indicators, radial thermostat and thermometer displays, etc.
Polar coordinates may be added together, subtracted from each other, multiplied and divided by scalars, and rotated by an angle. It is also possible to calculate the angle between polar coordinates.
- Available Extensions
Constructors
- PolarCoord(double radius, Angle angle)
-
const
Properties
Methods
-
angleBetween(
PolarCoord other, {bool? chooseReflexAngle}) → Angle -
Returns the
Angle
between thisPolarCoord
andother
. -
isApproximately(
PolarCoord other, {num percentVariance = 0.01}) → bool -
isEquivalentTo(
PolarCoord other) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rotate(
Angle angle) → PolarCoord -
Returns a
PolarCoord
equivalent to thisPolarCoord
rotated by the givenAngle
. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator *(
num scalar) → PolarCoord -
Multiplies the radius and angle of this
PolarCoord
by the givenscalar
. -
operator +(
PolarCoord other) → PolarCoord -
Adds
other
to thisPolarCoord
. -
operator -(
PolarCoord other) → PolarCoord -
Subtracts
other
from thisPolarCoord
. -
operator /(
num scalar) → PolarCoord -
Divides the radius and angle of this
PolarCoord
by the givenscalar
. -
operator ==(
Object other) → bool -
The equality operator.
override
-
operator unary-(
) → dynamic -
Inverts the direction of this
PolarCoord
, i.e., rotates it by 180°.