MatrixKt

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

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[]

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

Public methods

rotationMatrix

@NonNull
public static final 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

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

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

MatrixKt.times

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

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

translationMatrix

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

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

MatrixKt.values

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

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