object MathUtils
Utility class that offers math related useful methods
- Alphabetic
- By Inheritance
- MathUtils
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
areaToRadius(area: Double): Double
Return the radius of a circle of a given area
Return the radius of a circle of a given area
- area
the area
- returns
the radius
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
circleArea(radius: Double): Double
Returns the area of a circle of a given radius
Returns the area of a circle of a given radius
- radius
the radius
- returns
area
-
def
clamp(value: Double, min: Double, max: Double): Double
Method which limits a value between a minimum and a maximum ones
Method which limits a value between a minimum and a maximum ones
- value
the value
- min
the minimum value
- max
the maximum value
- returns
the clamped value
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
euclideanDistance(point1: Point, point2: Point): Double
Returns the Euclidean distance in 2D space
Returns the Euclidean distance in 2D space
- point1
first point
- point2
second point
- returns
Euclidean distance
-
def
euclideanDistance(position1: PositionComponent, position2: PositionComponent): Double
Returns the Euclidean distance in 2D space
Returns the Euclidean distance in 2D space
- position1
first position
- position2
second position
- returns
Euclidean distance
-
def
euclideanDistanceSq(point1: Point, point2: Point): Double
Returns the square of Euclidean distance in 2D space
Returns the square of Euclidean distance in 2D space
- point1
first point
- point2
second point
- returns
square of Euclidean distance
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
normalize(number: Double, min: Double, max: Double): Double
Returns the normalized value of a number between a min and a max
Returns the normalized value of a number between a min and a max
- number
the number
- min
the min number
- max
the max number
- returns
the normalized number between min and max
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unitVector(point1: Point, point2: Point): Vector
Returns the unit vector from point2 to point1
Returns the unit vector from point2 to point1
- point1
the unit vector's ending point
- point2
the unit vector's starting point
- returns
unitVector the unit vector from point2 to point1
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )