rotateFromVectorSelf

fun rotateFromVectorSelf(x: Double = definedExternally, y: Double = definedExternally): DOMMatrix(source)

The rotateFromVectorSelf() method of the DOMMatrix interface is a mutable transformation method that modifies a matrix by rotating the matrix by the angle between the specified vector and (1, 0).

MDN Reference