ImmutableVec.Companion


public static class ImmutableVec.Companion


Summary

Public methods

static final @NonNull ImmutableVec
fromDirectionInDegreesAndMagnitude(
    @AngleDegreesFloat float directionDegrees,
    float magnitude
)

Returns an ImmutableVec with the given magnitude and direction in degrees rotated from the positive x-axis in the direction of positive y-axis.

Extension functions

static final @NonNull ImmutableVec

Constructs an ImmutableVec with the values from point.

Public methods

fromDirectionInDegreesAndMagnitude

Added in 1.0.0-alpha07
public static final @NonNull ImmutableVec fromDirectionInDegreesAndMagnitude(
    @AngleDegreesFloat float directionDegrees,
    float magnitude
)

Returns an ImmutableVec with the given magnitude and direction in degrees rotated from the positive x-axis in the direction of positive y-axis.

Extension functions

AndroidGraphicsConverter.from

public static final @NonNull ImmutableVec AndroidGraphicsConverter.from(
    @NonNull ImmutableVec.Companion receiver,
    @NonNull PointF point
)

Constructs an ImmutableVec with the values from point.

Java callers should prefer AndroidGraphicsConverter.createVec(PointF)(createVec).