Phaser API Documentation

  Version: 

Member of: Phaser.Math

<static> RotateVec3(vec, axis, radians)

Description:

Rotates a vector in place by axis angle.

This is the same as transforming a point by an axis-angle quaternion, but it has higher precision.

Parameters:

name type description
vec Phaser.Math.Vector3

The vector to be rotated.

axis Phaser.Math.Vector3

The axis to rotate around.

radians number

The angle of rotation in radians.

Returns:
Description:

The given vector.

Since: 3.0.0
Source: src/math/RotateVec3.js (Line 15)