object Angle


A utility for working with a signed angle. A positive value represents rotation from the positive x-axis to the positive y-axis. Angle functions manage the conversion of angle values in degrees and radians. Most of Strokes API requires angle values in radians.

Summary

Public functions

@AngleRadiansFloat Float
@AngleRadiansFloat @FloatRange(from = 0.0, to = 6.283185307179586) Float
@AngleRadiansFloat @FloatRange(from = -3.141592653589793, to = 3.141592653589793) Float
@AngleDegreesFloat Float

Public properties

@AngleRadiansFloat Float

Angle of 2*PI radians.

@AngleRadiansFloat Float

Angle of PI radians.

@AngleRadiansFloat Float

Angle of PI/2 radians.

@AngleRadiansFloat Float

Angle of zero radians.

Public functions

degreesToRadians

Added in 1.0.0-alpha01
fun degreesToRadians(degrees: @AngleDegreesFloat Float): @AngleRadiansFloat Float

normalized

Added in 1.0.0-alpha01
fun normalized(radians: @AngleRadiansFloat Float): @AngleRadiansFloat @FloatRange(from = 0.0, to = 6.283185307179586) Float

normalizedAboutZero

Added in 1.0.0-alpha01
fun normalizedAboutZero(radians: @AngleRadiansFloat Float): @AngleRadiansFloat @FloatRange(from = -3.141592653589793, to = 3.141592653589793) Float

radiansToDegrees

Added in 1.0.0-alpha01
fun radiansToDegrees(radians: @AngleRadiansFloat Float): @AngleDegreesFloat Float

Public properties

FULL_TURN_RADIANS

Added in 1.0.0-alpha01
val FULL_TURN_RADIANS: @AngleRadiansFloat Float

Angle of 2*PI radians.

HALF_TURN_RADIANS

Added in 1.0.0-alpha01
val HALF_TURN_RADIANS: @AngleRadiansFloat Float

Angle of PI radians.

QUARTER_TURN_RADIANS

Added in 1.0.0-alpha01
val QUARTER_TURN_RADIANS: @AngleRadiansFloat Float

Angle of PI/2 radians.

ZERO

Added in 1.0.0-alpha01
val ZERO: @AngleRadiansFloat Float

Angle of zero radians.