27 return value >= std::numeric_limits<quint8>::min() && value <= std::numeric_limits<quint8>::max();
29 return value >= std::numeric_limits<quint16>::min() && value <= std::numeric_limits<quint16>::max();
31 return value >= std::numeric_limits<qint16>::min() && value <= std::numeric_limits<qint16>::max();
33 return value >= std::numeric_limits<quint32>::min() && value <= std::numeric_limits<quint32>::max();
35 return value >= std::numeric_limits<qint32>::min() && value <= std::numeric_limits<qint32>::max();
37 return std::isnan( value ) || std::isinf( value ) ||
38 ( value >= -std::numeric_limits<float>::max() && value <= std::numeric_limits<float>::max() );
50 return static_cast<quint8
>( value );
52 return static_cast<quint16
>( value );
54 return static_cast<qint16
>( value );
56 return static_cast<quint32
>( value );
58 return static_cast<qint32
>( value );
60 return static_cast<float>( value );
Thirty two bit signed integer (qint32)
Thirty two bit unsigned integer (quint32)
DataType
Raster data types.
Thirty two bit floating point (float)
Sixteen bit signed integer (qint16)
Sixteen bit unsigned integer (quint16)
static bool isRepresentableValue(double value, Qgis::DataType dataType)
Check if the specified value is representable in the given data type.
static double representableValue(double value, Qgis::DataType dataType)
Get value representable by given data type.
Eight bit unsigned integer (quint8)