ImmutableVec.Companion



Summary

Public functions

ImmutableVec
fromDirectionAndMagnitude(
    direction: @AngleRadiansFloat Float,
    magnitude: Float
)
android

Extension functions

ImmutableVec

Constructs an ImmutableVec with the values from point.

android
ImmutableVec

Constructs an ImmutableVec with the values from offset.

android

Public functions

fromDirectionAndMagnitude

fun fromDirectionAndMagnitude(
    direction: @AngleRadiansFloat Float,
    magnitude: Float
): ImmutableVec

Extension functions

from

fun ImmutableVec.Companion.from(point: PointF): ImmutableVec

Constructs an ImmutableVec with the values from point.

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

fun ImmutableVec.Companion.from(offset: Offset): ImmutableVec

Constructs an ImmutableVec with the values from offset.

Performance-sensitive code should use the populateFrom overload that takes a pre-allocated MutableVec, so that instance can be reused across multiple calls.