Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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);
 }
Exemplo n.º 6
0
 public Vector2D GetMove(double distance, Vector2D towards) {
     Vector2D ret = new Vector2D(x, z);
     ret.Move(distance, towards);
     return ret;
 }