format
typescript
Quaternion.Get(index)class: Quaternion
description
Get the component of the quaternion by index.
parameter
| param_name | type | description |
|---|---|---|
| index | number | 0 for x component, 1 for y component, 2 for z component, 3 for w component. |
reture
| type | description |
|---|---|
number | The 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));
}
}