Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="center"></param>
 /// <param name="offsetX"></param>
 /// <param name="offsetY"></param>
 public Interval2d(Vector2d center, double offsetX, double offsetY)
 {
     X = new Intervald(center.X - offsetX, center.X + offsetX);
     Y = new Intervald(center.Y - offsetY, center.Y + offsetY);
 }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="center"></param>
 /// <param name="offset"></param>
 public Interval2d(Vector2d center, double offset)
     : this(center, offset, offset)
 {
 }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="ab"></param>
 public Interval2d(Vector2d ab)
 {
     X = new Intervald(ab.X);
     Y = new Intervald(ab.Y);
 }
Exemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="a"></param>
 /// <param name="b"></param>
 public Interval2d(Vector2d a, Vector2d b)
 {
     X = new Intervald(a.X, b.X);
     Y = new Intervald(a.Y, b.Y);
 }
Exemplo n.º 5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="point"></param>
 /// <param name="from"></param>
 /// <param name="to"></param>
 /// <returns></returns>
 public static Vector2d Remap(Vector2d point, Interval2d from, Interval2d to)
 {
     point.X = Intervald.Remap(point.X, from.X, to.X);
     point.Y = Intervald.Remap(point.Y, from.Y, to.Y);
     return(point);
 }