예제 #1
0
파일: Vector2D.cs 프로젝트: lanicon/Styx
 /// <summary>
 /// A method to calculate the absolute value of the given vector.
 /// </summary>
 /// <param name="v">A vector.</param>
 /// <returns>The absolute value of v: (|a| |b|)</returns>
 public IVector2D <T> Abs(IVector2D <T> v)
 {
     return(new Vector2D <T>(Math.Abs(v.X),
                             Math.Abs(v.Y)));
 }