Enum RasterConversionPolicy
Semantic policy selecting how one raster sample representation may be converted to another.
enum RasterConversionPolicy : ubyte { ... }
Only exact is currently part of the public contract.
exact means:
- every legal source value is representable in the destination type without numerical information loss; - no rounding, truncation, saturation, clamping or overflow policy is involved; - NaN/infinity behavior is admitted only when the complete source floating domain is exactly preserved by the destination representation; - unsupported source/destination type pairs are rejected by the conversion API at compile time rather than becoming per-sample runtime failures.
Future enum members, if any, require their own fully specified semantics and qualification before promotion.
Enum members
| Name | Description |
|---|
Example
Example selecting the only promoted v0.2 conversion policy.
import raster;
const policy =
RasterConversionPolicy .exact;
assert(
policy
== RasterConversionPolicy .exact
);