MCPcopy Create free account
hub / github.com/PDAL/PDAL / FloatNodeImpl

Method FloatNodeImpl

plugins/e57/libE57Format/src/FloatNodeImpl.cpp:34–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32namespace 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected