Vector3.Sub C# (CSharp) Метод

Sub() публичный Метод

public Sub ( Vector3 v ) : Vector3
v Vector3
Результат Vector3
  public Vector3 Sub (Vector3 v) {
    return new Vector3 (
        this.x - v.x,
        this.y - v.y,
        this.z - v.z
        );
  }

Usage Example

Пример #1
0
 /// <summary>
 /// Builds a ball socket joint.
 /// </summary>
 /// <param name="connectionA">First connection in the pair.</param>
 /// <param name="connectionB">Second connection in the pair.</param>
 /// <param name="anchor">World space anchor location used to initialize the local anchors.</param>
 public IKBallSocketJoint(Bone connectionA, Bone connectionB, Vector3 anchor)
     : base(connectionA, connectionB)
 {
     Vector3 tmp;
     anchor.Sub(ref ConnectionA.Position, out tmp);
     SetOffsetA(ref tmp);
     anchor.Sub(ref ConnectionB.Position, out tmp);
     SetOffsetB(ref tmp);
 }
All Usage Examples Of Vector3::Sub