patrickfrey / strusBase

Implements some libraries with common functions and interfaces of the strus projects
Mozilla Public License 2.0
4 stars 1 forks source link

NumericVariant tofloat should be called todouble #3

Closed andreasbaumann closed 8 years ago

andreasbaumann commented 8 years ago

NumericVariant:

    /// \brief Cast to an unsigned integer
    double tofloat() const
    {
        return cast<double>();
    }
patrickfrey commented 8 years ago

Float is meant as a concept rather than a low level data type. Variant is an interface data type representing a number than can be integral or a floating point. For a floating point number representation we chose double. But it could be as well a long double. For integer numbers we chose int, but it could as well be a long or long long if available.