A3DUnitGetFromValue

A3DEUnits A3DUnitGetFromValue(A3DDouble dUnit)
A3DEUnits A3DUnitGetFromValue(A3DDouble dUnit)

Converts a units representation from``A3DDouble``to:c:enum:~A3DEUnits.

14.1

HOOPS Exchange stores most of its unit information as factors of millimeters, as described in:c:enum:~A3DEUnits. This function allows you to retrieve the correct unit enumeration given an input value. For example, a value of*10.*returns:c:enumerator:~kA3DUnitCentimeter.

Behavior

To properly retrieve the correct:c:enum:~A3DEUnitsfor a given``A3DDouble``input, HOOPS Exchange compares it with the expected float value of each unit (as returned by:c:func:~A3DUnitGetFromEnum) given a unit-specific threshold as presented by this table:

**Enumerator** | **Value (millimeters)** | **Threshold**

If the provided value does not fall under any of these value ranges, the function returns:c:enumerator:~kA3DUnitUnknown.

Parameters

dUnit: A unit value (in millimeter)

Returns

An:c:enum:~A3DEUnitsvalue