Esempio n. 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));
 }
Esempio n. 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));
 }
Esempio n. 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));
 }
Esempio n. 4
0
 public float GetField()
 {
     return(SexyMath.CircleField(Radius));
 }
Esempio n. 5
0
 public override bool CheckCollision(Point collider)
 {
     return(SexyMath.CheckCollision(this, collider));
 }
Esempio n. 6
0
 public float GetPeremiter()
 {
     return(SexyMath.CirclePeremiter(Radius));
 }