TRange


This template represents ranges.

You can find more information in comments below.

template<class TYPE>
union TRange
{
    struct // As interval
    {
        TYPE From;
        TYPE Till;
    };
    struct // As limits
    {
        TYPE Minimum;
        TYPE Maximum;
    };
    struct // As segment
    {
        TYPE A;
        TYPE B;
    };
};

Additionally following operators exists.

template<class TYPE>
bool operator==(const TRange<TYPE> &a, const TRange<TYPE> &b); // Check whether ranges are equal. Can be used for non-float data types only
template<class TYPE>
bool operator!=(const TRange<TYPE> &a, const TRange<TYPE> &b); // Check whether ranges aren't equal. Can be used for non-float data types only

Also there are some functions which can be used with TRange template. Here they are.

Namespace: ntl
Include: NTL/Core/Range.h