| 32 | namespace e57 |
| 33 | { |
| 34 | FloatNodeImpl::FloatNodeImpl( ImageFileImplWeakPtr destImageFile, double value, |
| 35 | FloatPrecision precision, double minimum, double maximum ) : |
| 36 | NodeImpl( destImageFile ), value_( value ), precision_( precision ), minimum_( minimum ), |
| 37 | maximum_( maximum ) |
| 38 | { |
| 39 | // Since this ctor also used to construct single precision, and defaults for minimum/maximum |
| 40 | // are for double precision, adjust bounds smaller if single. |
| 41 | if ( precision_ == PrecisionSingle ) |
| 42 | { |
| 43 | if ( minimum_ < FLOAT_MIN ) |
| 44 | { |
| 45 | minimum_ = FLOAT_MIN; |
| 46 | } |
| 47 | if ( maximum_ > FLOAT_MAX ) |
| 48 | { |
| 49 | maximum_ = FLOAT_MAX; |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | // Throw an exception if the value is not within bounds. |
| 55 | void FloatNodeImpl::validateValue() const |
nothing calls this directly
no outgoing calls
no test coverage detected