Quaternion
Link to quaternion
导入类
Link to 导入类
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.util.math.Quaternion;
使用方式
Link to 使用方式
Name: conj
ZenScript Copy// Quaternion.conj()
myQuaternion.conj();
Name: copy
Return Type: Quaternion
ZenScript Copy// Quaternion.copy() as Quaternion
myQuaternion.copy();
Name: i
Return Type: float
ZenScript Copy// Quaternion.i() as float
myQuaternion.i();
Name: j
Return Type: float
ZenScript Copy// Quaternion.j() as float
myQuaternion.j();
Name: k
Return Type: float
ZenScript Copy// Quaternion.k() as float
myQuaternion.k();
Name: mul
ZenScript CopyQuaternion.mul(value as float)
参数 | 类型 |
---|---|
参数 value | 类型 float |
Name: normalize
ZenScript Copy// Quaternion.normalize()
myQuaternion.normalize();
Name: r
Return Type: float
ZenScript Copy// Quaternion.r() as float
myQuaternion.r();
Name: setValue
ZenScript CopyQuaternion.setValue(i as float, j as float, k as float, r as float)
参数 | 类型 |
---|---|
参数 i | 类型 float |
参数 j | 类型 float |
参数 k | 类型 float |
参数 r | 类型 float |
Name: slerp
ZenScript CopyQuaternion.slerp(other as Quaternion, value as float)
参数 | 类型 |
---|---|
参数 other | 类型 Quaternion |
参数 value | 类型 float |
Name: toXYZ
Return Type: Vector3f
ZenScript Copy// Quaternion.toXYZ() as Vector3f
myQuaternion.toXYZ();
Name: toXYZDegrees
Return Type: Vector3f
ZenScript Copy// Quaternion.toXYZDegrees() as Vector3f
myQuaternion.toXYZDegrees();
Name: toYXZ
Return Type: Vector3f
ZenScript Copy// Quaternion.toYXZ() as Vector3f
myQuaternion.toYXZ();
Name: toYXZDegrees
Return Type: Vector3f
ZenScript Copy// Quaternion.toYXZDegrees() as Vector3f
myQuaternion.toYXZDegrees();
名称 | 类型 | 可获得 | 可设置 |
---|---|---|---|
名称 i | 类型 float | 可获得 true | 可设置 false |
名称 j | 类型 float | 可获得 true | 可设置 false |
名称 k | 类型 float | 可获得 true | 可设置 false |
名称 r | 类型 float | 可获得 true | 可设置 false |
名称 xyz | 类型 Vector3f | 可获得 true | 可设置 false |
名称 xyzDegrees | 类型 Vector3f | 可获得 true | 可设置 false |
名称 yxz | 类型 Vector3f | 可获得 true | 可设置 false |
名称 yxzDegrees | 类型 Vector3f | 可获得 true | 可设置 false |