Class StepColorTreeSlot
- Namespace
- Hi.MachiningProcs
- Assembly
- HiNc.dll
Internal Use Only. How a step's inspecting slot holds the outcome of a StepColorTree: the id of the leaf the step fell into in bits 63 to 32 and the leaf's shown value, a float32, in bits 31 to 0 of one double. An id below IdLimit leaves the sign and every exponent bit 0, so the packed double is finite — a subnormal or zero — whatever the value's bits, NaN included; the slot's own “no value”, NaN, is therefore never a packed outcome. Packing and unpacking move bits only: no floating-point operation runs, so no flush-to-zero or denormals-are-zero mode can change them.
public static class StepColorTreeSlot
- Inheritance
-
StepColorTreeSlot
- Inherited Members
Methods
Pack(int, float)
Packs a leaf id and the leaf's shown value into one double.
public static double Pack(int leafId, float leafValue)
Parameters
Returns
- double
The packed double, never NaN.
TryUnpack(double, out int, out float)
Reads a leaf id and the leaf's shown value back from a packed double.
public static bool TryUnpack(double packed, out int leafId, out float leafValue)
Parameters
packeddoubleThe slot's value.
leafIdintThe leaf id; 0 when
packedis NaN.leafValuefloatThe shown value, bit for bit as packed; NaN when
packedis NaN.
Returns
- bool
False when
packedis NaN: the step fell into no leaf, the tree threw, or the slot is not filled.