public static class 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 fields

static final @AngleRadiansFloat float

Angle of 2*PI radians.

static final @AngleRadiansFloat float

Angle of PI radians.

static @NonNull Angle
static final @AngleRadiansFloat float

Angle of PI/2 radians.

static final @AngleRadiansFloat float

Angle of zero radians.

Public methods

static final @AngleRadiansFloat float
static final @AngleRadiansFloat @FloatRange(from = 0.0, to = 6.283185307179586) float
normalized(@AngleRadiansFloat float radians)
static final @AngleRadiansFloat @FloatRange(from = -3.141592653589793, to = 3.141592653589793) float
static final @AngleDegreesFloat float

Public fields

FULL_TURN_RADIANS

Added in 1.0.0-alpha01
public static final @AngleRadiansFloat float FULL_TURN_RADIANS

Angle of 2*PI radians.

HALF_TURN_RADIANS

Added in 1.0.0-alpha01
public static final @AngleRadiansFloat float HALF_TURN_RADIANS

Angle of PI radians.

INSTANCE

Added in 1.0.0-alpha01
public static @NonNull Angle INSTANCE

QUARTER_TURN_RADIANS

Added in 1.0.0-alpha01
public static final @AngleRadiansFloat float QUARTER_TURN_RADIANS

Angle of PI/2 radians.

ZERO

Added in 1.0.0-alpha01
public static final @AngleRadiansFloat float ZERO

Angle of zero radians.

Public methods

degreesToRadians

Added in 1.0.0-alpha01
public static final @AngleRadiansFloat float degreesToRadians(@AngleDegreesFloat float degrees)

normalized

Added in 1.0.0-alpha01
public static final @AngleRadiansFloat @FloatRange(from = 0.0, to = 6.283185307179586) float normalized(@AngleRadiansFloat float radians)

normalizedAboutZero

Added in 1.0.0-alpha01
public static final @AngleRadiansFloat @FloatRange(from = -3.141592653589793, to = 3.141592653589793) float normalizedAboutZero(@AngleRadiansFloat float radians)

radiansToDegrees

Added in 1.0.0-alpha01
public static final @AngleDegreesFloat float radiansToDegrees(@AngleRadiansFloat float radians)