Vector3
- Angle
- ClampMagnitude
- Cross
- Distance
- Dot
- forward
- Lerp
- magnitude
- Max
- Min
- MoveTowards
- normalized
- Normalize
- one
- operator !=
- operator *
- operator +
- operator -
- operator /
- operator ==
- OrthoNormalize
- Project
- Reflect
- right
- RotateTowards
- Scale
- Slerp
- SmoothDamp
- sqrMagnitude
- this [int index]
- ToString
- up
- Vector3
- x
- y
- zero
- z
Vector3.operator - 运算符 减法
static operator - (a : Vector3, b : Vector3) : Vector3
Description描述
Subtracts one vector from another.
一个向量减另一个向量。
Subtracts each component of b from a.
从a的对应的每个组件减b对应的每个组件。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
print(new Vector3(1, 2, 3) - new Vector3(6, 5, 4));
}
}
• static operator - (a : Vector3) : Vector3
Description描述
Negates a vector.
向量求反。
Each component in the result is negated.
结果是每个组件是取它相反数。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
print(-new Vector3(1, 2, 3));
}
}
// prints (-1.0,-2.0,-3.0)
print (-Vector3(1,2,3));
最后修改:2010年12月20日 Monday 23:21