Vector3.Add C# (CSharp) Method

Add() public method

public Add ( Vector3 v ) : Vector3
v Vector3
return Vector3
  public Vector3 Add (Vector3 v) {
    return new Vector3 (
        this.x + v.x,
        this.y + v.y,
        this.z + v.z
        );
  }

Usage Example

Example #1
0
 private static Vector3 GetAnchorGuess(Entity connectionA, Entity connectionB)
 {
     var anchor = new Vector3();
     if (connectionA != null)
         anchor.Add( ref connectionA.position, out anchor );
     if (connectionB != null)
         anchor.Add( ref connectionB.position, out anchor );
     if (connectionA != null && connectionB != null)
         anchor.Mult( 0.5f, out anchor );
     return anchor;
 }
All Usage Examples Of Vector3::Add