fromUniformScale

fun fromUniformScale(scale: Double, result: Matrix3? = definedExternally): Matrix3(source)

Computes a Matrix3 instance representing a uniform scale.

// Creates
// [2.0, 0.0, 0.0]
// [0.0, 2.0, 0.0]
// [0.0, 0.0, 2.0]
const m = Matrix3.fromUniformScale(2.0);

Return

The modified result parameter, or a new Matrix3 instance if one was not provided.

Parameters

scale

The uniform scale factor.

result

The object in which the result will be stored, if undefined a new instance will be created.

See also