コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 public void Include(Domain2d other)
 {
     X.Include(other.X);
     Y.Include(other.Y);
 }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 /// <param name="tolerance"></param>
 /// <returns></returns>
 public bool ApproxEquals(Domain2d other, double tolerance = zMath.ZeroTolerance)
 {
     return(X.ApproxEquals(other.X, tolerance) && Y.ApproxEquals(other.Y, tolerance));
 }
コード例 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="d0"></param>
 /// <param name="d1"></param>
 /// <returns></returns>
 public static Domain2d Intersect(Domain2d d0, Domain2d d1)
 {
     d0.X = Domain1d.Intersect(d0.X, d1.X);
     d0.Y = Domain1d.Intersect(d0.Y, d1.Y);
     return(d0);
 }
コード例 #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="a"></param>
 /// <param name="b"></param>
 /// <returns></returns>
 public static Domain2d Union(Domain2d a, Domain2d b)
 {
     a.X = Domain1d.Union(a.X, b.X);
     a.Y = Domain1d.Union(a.Y, b.Y);
     return(a);
 }
コード例 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="point"></param>
 /// <param name="from"></param>
 /// <param name="to"></param>
 /// <returns></returns>
 public static Vec2d Remap(Vec2d point, Domain2d from, Domain2d to)
 {
     point.X = Domain1d.Remap(point.X, from.X, to.X);
     point.Y = Domain1d.Remap(point.Y, from.Y, to.Y);
     return(point);
 }