ceiled - multiple declarations
Function ceiled
Returns a point with each coordinate rounded toward positive infinity.
This operation is available only for floating-point geometry and retains the original scalar type. Non-finite values follow the underlying floating-point ceil semantics.
No allocation is performed.
Complexity
O(1) time and O(1) auxiliary space.
Function ceiled
Returns a vector with each component rounded toward positive infinity.
This operation is available only for floating-point geometry and retains the original scalar type. Non-finite values follow the underlying floating-point ceil semantics.
No allocation is performed.
Complexity
O(1) time and O(1) auxiliary space.
Example
Example rounding coordinates toward positive infinity.
import geo;
const point =
Point2!double(
1.75,
-2.25
);
const vector =
Vector2!double(
-1.25,
2.75
);
assert(
point .ceiled ==
Point2!double(
2.0,
-2.0
)
);
assert(
vector .ceiled ==
Vector2!double(
-1.0,
3.0
)
);