fromScale

fun fromScale(scale: Cartesian3, result: Matrix3? = definedExternally): Matrix3(source)

Computes a Matrix3 instance representing a non-uniform scale.

// Creates
// [7.0, 0.0, 0.0]
// [0.0, 8.0, 0.0]
// [0.0, 0.0, 9.0]
const m = Matrix3.fromScale(new Cartesian3(7.0, 8.0, 9.0));

Return

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

Parameters

scale

The x, y, and z scale factors.

result

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

See also