Пример #1
0
 /// <summary>
 /// Gets a vector where every indices has been Math.Sined.
 /// </summary>
 /// <param name="Vector">The vector.</param>
 /// <returns>A sined Vector</returns>
 public static Vector2D SinVector(Vector2D Vector) {
     return new Vector2D(Math.Sin(Vector.x),
                         Math.Sin(Vector.z));
 }
Пример #2
0
 /// <summary>
 /// Gets a vector where every indices has been Math.Absoluted.
 /// </summary>
 /// <param name="Vector">The vector.</param>
 /// <returns>A absoluted Vector</returns>
 public static Vector2D AbsVector(Vector2D Vector) {
     return new Vector2D(Math.Abs(Vector.x),
                         Math.Abs(Vector.z));
 }
Пример #3
0
 /// <summary>
 /// Gets a vector where every indices has been Math.Tangented.
 /// </summary>
 /// <param name="Vector">The vector.</param>
 /// <returns>A tangified Vector</returns>
 public static Vector2D TanVector(Vector2D Vector) {
     return new Vector2D(Math.Tan(Vector.x),
                         Math.Tan(Vector.z));
 }
Пример #4
0
 /// <summary>
 /// Gets a vector where every indices has been Math.Cosined.
 /// </summary>
 /// <param name="Vector">The vector.</param>
 /// <returns>A cosined Vector</returns>
 public static Vector2D CosVector(Vector2D Vector) {
     return new Vector2D(Math.Cos(Vector.x),
                         Math.Cos(Vector.z));
 }
Пример #5
0
 public void Move(double distance, Vector2D towards) {
     Vector2D way = towards - this;
     double length = way.Length;
     x += (double)((way.x / length) * distance);
     z += (double)((way.z / length) * distance);
 }
Пример #6
0
 public Vector2D GetMove(double distance, Vector2D towards) {
     Vector2D ret = new Vector2D(x, z);
     ret.Move(distance, towards);
     return ret;
 }