示例#1
0
 /// <summary>
 /// Returns a vector that points to the defined direction (x, y) but has length equal to 1.
 /// </summary>
 public Vector2D GetUnitVector()
 {
     return(SexyMath.UnitVector(X, Y));
 }
示例#2
0
 /// <summary>
 /// <para>Returns length of a vector.</para>
 /// <para>It's basically length of line segment from (0,0) to (x, y)</para>
 public float GetLength()
 {
     return(SexyMath.VectorLength(X, Y));
 }
示例#3
0
 /// <summary>
 /// <para>Returns angle between vector (x, y) that starts in (0, 0) relative to X+ axis.</para>
 /// <para>X values grow to the right, Y values grow to the bottom.</para>
 /// </summary>
 public float GetAngle()
 {
     return(SexyMath.VectorAngle(X, Y));
 }
示例#4
0
 public float GetField()
 {
     return(SexyMath.CircleField(Radius));
 }
示例#5
0
 public override bool CheckCollision(Point collider)
 {
     return(SexyMath.CheckCollision(this, collider));
 }
示例#6
0
 public float GetPeremiter()
 {
     return(SexyMath.CirclePeremiter(Radius));
 }