This companion object of class `Direction` provides some constants of type Direction and methods for creating new Direction instances.
Attributes
- Companion
- class
- Source
- Direction.scala
- Graph
-
- Supertypes
- Self type
-
Direction.type
Members list
Type members
Inherited and Abstract types
The names of the product elements.
The name of the type.
Value members
Concrete methods
Takes in an angle as degrees and returns the corresponding smile.modeling.Direction. Zero degrees points rightwards, positive angles are counterclockwise from there, and negative ones clockwise.
Takes in an angle as degrees and returns the corresponding smile.modeling.Direction. Zero degrees points rightwards, positive angles are counterclockwise from there, and negative ones clockwise.
Attributes
- Source
- Direction.scala
Takes in a difference between x coordinates and a difference between y coordinates and constructs a smile.modeling.Direction from them.
Takes in a difference between x coordinates and a difference between y coordinates and constructs a smile.modeling.Direction from them.
Value parameters
- dx
-
a difference between two x coordinates. It need not lie between -1.0 and +1.0 like the
dxanddyof the resulting smile.modeling.Direction object. - dy
-
a difference between two y coordinates. It need not lie between -1.0 and +1.0 like the
dxanddyof the resulting smile.modeling.Direction object.
Attributes
- Returns
-
the smile.modeling.Direction that corresponds to the given deltas. If both are exactly equal to zero, returns smile.modeling.Direction.NoDirection.
- Source
- Direction.scala
Takes in an angle as radians and returns the corresponding smile.modeling.Direction. Zero radians points rightwards, positive angles are counterclockwise from there, and negative ones clockwise.
Takes in an angle as radians and returns the corresponding smile.modeling.Direction. Zero radians points rightwards, positive angles are counterclockwise from there, and negative ones clockwise.
Attributes
- Source
- Direction.scala
Returns a randomly chosen direction, a whole number of degrees picked evenly from 0 to 359.
Returns a randomly chosen direction, a whole number of degrees picked evenly from 0 to 359.
Attributes
- Source
- Direction.scala
Concrete fields
the “straight downwards” direction with a dx of zero, and a dy of +1
the “straight downwards” direction with a dx of zero, and a dy of +1
Attributes
- Source
- Direction.scala
the “straight leftwards” direction with a dx of -1, and a dy of zero
the “straight leftwards” direction with a dx of -1, and a dy of zero
Attributes
- Source
- Direction.scala
a “non-direction” whose dx and dy are both zero
the “straight rightwards” direction with a dx of +1, and a dy of zero
the “straight rightwards” direction with a dx of +1, and a dy of zero
Attributes
- Source
- Direction.scala
the “straight upwards” direction with a dx of zero, and a dy of -1
the “straight upwards” direction with a dx of zero, and a dy of -1
Attributes
- Source
- Direction.scala
Givens
Givens
Attributes
- Source
- Direction.scala
