Wilang Documentation1.0.0+4

rotate#

Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.

Available in: math cells, REPL.

Syntax#

rotate(w, theta)
rotate(w, theta, v)

Arguments and behavior#

For matrices, dimensions must match the operation. Singular matrices or incompatible shapes can fail. Cell indexing starts at 1. The example returns matrix.

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
rotate([1, 0], pi / 2)

Expected result: matrix.

See also#

matrix · rotationMatrix

All functions · Math guides