CartesianAngle extension
Extensions for Angle
objects that introduce Cartesian concepts.
Clockwise and Counter-Clockwise: You might wonder why CW and CCW properties
are defined here, rather than on Angle
, itself. Consider that when you
look at a device screen, positive angles move clockwise. When you look at
a mathematical graph, positive angles move counter-clockwise. An angle in
isolation cannot know whether it is CW or CCW. Thus, this directional
concept is tied to a particular Cartesian orientation.
- on
Methods
-
direction(
[CartesianOrientation orientation = CartesianOrientation.screen]) → AngleDirection -
Returns
AngleDirection.clockwise
if thisAngle
is clockwise within the givenorientation
, orAngleDirection.counterClockwise
otherwise. -
isClockwise(
[CartesianOrientation orientation = CartesianOrientation.screen]) → bool -
True if this
Angle
represents a clockwise arc, or zero. -
isCounterClockwise(
[CartesianOrientation orientation = CartesianOrientation.screen]) → bool -
True if this
Angle
represents a counter-clockwise arc, or zero. -
makeClockwise(
[CartesianOrientation orientation = CartesianOrientation.screen]) → Angle -
Returns a clockwise version of this
Angle
. -
makeCounterClockwise(
[CartesianOrientation orientation = CartesianOrientation.screen]) → Angle -
Returns a counter-clockwise version of this
Angle
.