MatrixKt

Added in 1.1.0

public final class MatrixKt


Summary

Public methods

static final @NonNull Matrix
rotationMatrix(float degrees, float px, float py)

Creates a rotation matrix, defined by a rotation angle in degrees around the pivot point located at the coordinates (px, py).

static final @NonNull Matrix
scaleMatrix(float sx, float sy)

Creates a scale matrix with the scale factor sx and sy respectively on the x and y axis.

static final @NonNull Matrix
times(@NonNull Matrix receiver, @NonNull Matrix m)

Multiplies this Matrix by another matrix and returns the result as a new matrix.

static final @NonNull Matrix
translationMatrix(float tx, float ty)

Creates a translation matrix with the translation amounts tx and ty respectively on the x and y axis.

static final @NonNull float[]
values(@NonNull Matrix receiver)

Returns the 9 values of this Matrix as a new array of floats.

Public methods

rotationMatrix

public static final @NonNull Matrix rotationMatrix(float degrees, float px, float py)

Creates a rotation matrix, defined by a rotation angle in degrees around the pivot point located at the coordinates (px, py).

scaleMatrix

public static final @NonNull Matrix scaleMatrix(float sx, float sy)

Creates a scale matrix with the scale factor sx and sy respectively on the x and y axis.

times

public static final @NonNull Matrix times(@NonNull Matrix receiver, @NonNull Matrix m)

Multiplies this Matrix by another matrix and returns the result as a new matrix.

translationMatrix

public static final @NonNull Matrix translationMatrix(float tx, float ty)

Creates a translation matrix with the translation amounts tx and ty respectively on the x and y axis.

values

public static final @NonNull float[] values(@NonNull Matrix receiver)

Returns the 9 values of this Matrix as a new array of floats.