class Rotation2D: Any

Represents a rotation anticlockwise in 2D.

Fields

Name Description
val angle: Double

angle in radians normalized to the interval of [0, 2PI)

Constructors

<init>

constructor(angle: Double)

Represents a rotation anticlockwise in 2D.

Parameters

Name Description
angle: Double

angle in radians, whereas the angle 0.0 corresponds to the x-axis

Methods

plus

operator fun plus(v: Rotation2D): Rotation2D

Parameters

Name Description
v: Rotation2D

ReturnValue

Name Description
Rotation2D

minus

operator fun minus(v: Rotation2D): Rotation2D

Parameters

Name Description
v: Rotation2D

ReturnValue

Name Description
Rotation2D

times

operator fun times(m: Rotation2D): Rotation2D

Parameters

Name Description
m: Rotation2D

ReturnValue

Name Description
Rotation2D

div

operator fun div(m: Rotation2D): Rotation2D

Parameters

Name Description
m: Rotation2D

ReturnValue

Name Description
Rotation2D

unaryPlus

operator fun unaryPlus(): Rotation2D

ReturnValue

Name Description
Rotation2D

unaryMinus

operator fun unaryMinus(): Rotation2D

ReturnValue

Name Description
Rotation2D

equals

fun equals(other: Any?): Boolean

Parameters

Name Description
other: Any?

ReturnValue

Name Description
Boolean

hashCode

fun hashCode(): Int

ReturnValue

Name Description
Int

toAngleRadians

fun toAngleRadians(): Double

ReturnValue

Name Description
Double

toAngleDegree

fun toAngleDegree(): this.angle * RAD_TO_DEG

ReturnValue

Name Description
this.angle * RAD_TO_DEG

CompanionObject

Rotation2D

class Rotation2D: Any

Represents a rotation anticlockwise in 2D.

Fields

Name Description
val ZERO: Rotation2D

Methods

of

fun of(angleDegree: Double): Rotation2D

Create a Rotation2D from an angle provided in degrees.

Parameters

Name Description
angleDegree: Double

ReturnValue

Name Description
Rotation2D

of

fun of(direction: Vector2D): Rotation2D

Creates a Rotation2D which is defined from the x axis to the given direction vector.

Parameters

Name Description
direction: Vector2D

ReturnValue

Name Description
Rotation2D