Skip to content

format

typescript
Quaternion.Get(index)

class: Quaternion

description

Get the component of the quaternion by index.

parameter

param_nametypedescription
indexnumber0 for x component, 1 for y component, 2 for z component, 3 for w component.

reture

typedescription
numberThe value of the corresponding component.

code example

typescript
function QuaternionTest (){
    let identity = Quaternion.identity;
    for(let i = 0; i < 4; i++)
    {
        Debug.Log(identity.Get(i));
    }
}