public Quad(Point v00, Point v01, Point v11, Point v10) { DebugVerify.IsNotNaN(v00); DebugVerify.IsNotNaN(v01); DebugVerify.IsNotNaN(v11); DebugVerify.IsNotNaN(v10); this.v00 = v00; this.v01 = v01; this.v10 = v10; this.v11 = v11; }
public ValuesInCell(double leftBottom, double rightBottom, double rightTop, double leftTop) { DebugVerify.IsNotNaN(leftBottom); DebugVerify.IsNotNaN(rightBottom); DebugVerify.IsNotNaN(rightTop); DebugVerify.IsNotNaN(leftTop); this.leftTop = leftTop; this.leftBottom = leftBottom; this.rightTop = rightTop; this.rightBottom = rightBottom; left = (leftTop + leftBottom) / 2; right = (rightTop + rightBottom) / 2; top = (leftTop + rightTop) / 2; bottom = (leftBottom + rightBottom) / 2; }
public ValuesInCell(double leftBottom, double rightBottom, double rightTop, double leftTop, double missingValue) { DebugVerify.IsNotNaN(leftBottom); DebugVerify.IsNotNaN(rightBottom); DebugVerify.IsNotNaN(rightTop); DebugVerify.IsNotNaN(leftTop); // Copy values and find min and max with respect to possible missing values if (leftTop != missingValue) { this.leftTop = leftTop; if (min > leftTop) { min = leftTop; } if (max < leftTop) { max = leftTop; } } else { this.leftTop = Double.NaN; } if (leftBottom != missingValue) { this.leftBottom = leftBottom; if (min > leftBottom) { min = leftBottom; } if (max < leftBottom) { max = leftBottom; } } else { this.leftBottom = Double.NaN; } if (rightTop != missingValue) { this.rightTop = rightTop; if (min > rightTop) { min = rightTop; } if (max < rightTop) { max = rightTop; } } else { this.rightTop = Double.NaN; } if (rightBottom != missingValue) { this.rightBottom = rightBottom; if (min > rightBottom) { min = rightBottom; } if (max < rightBottom) { max = rightBottom; } } else { this.rightBottom = Double.NaN; } left = (this.leftTop + this.leftBottom) / 2; bottom = (this.leftBottom + this.rightBottom) / 2; right = (this.rightTop + this.rightBottom) / 2; top = (this.rightTop + this.leftTop) / 2; /* * if (leftTop != missingValue && ) * { * if (leftBottom != missingValue) * left = (leftTop + leftBottom) / 2; * else * left = Double.NaN; * * if (rightTop != missingValue) * top = (leftTop + rightTop) / 2; * else * top = Double.NaN; * } * * if (rightBottom != missingValue) * { * if (leftBottom != missingValue) * bottom = (leftBottom + rightBottom) / 2; * else * bottom = Double.NaN; * * if (rightTop != missingValue) * right = (rightTop + rightBottom) / 2; * else * right = Double.NaN; * }*/ }