#include <opennurbs_defines.h>
|
static int | Compare (const double *lhs, const double *rhs) |
| Well ordered compare that handles nullpt and nans and sorts them to the end. ON_DBL::Compare(nullptr, nullptr) = 0; ON_DBL::Compare(not nullptr, nullptr) = -1; ON_DBL::Compare(nullptr, not nullptr) = +1; ON_DBL::Compare(not nullptr, not nullptr) = ON_DBL::CompareValue(*lhs,*rhs); More...
|
|
static int | CompareValue (double lhs, double rhs) |
| Well ordered compare that handles nans and sorts them to the end. ON_DBL::CompareValue(nan, nan) = 0; ON_DBL::CompareValue(non_nan, nan) = -1; ON_DBL::CompareValue(nan, non_nan) = +1; More...
|
|
static bool | IsInfinity (double x) |
|
static bool | IsNan (double x) |
|
static bool | IsNegativeInfinity (double x) |
|
static bool | IsNotNan (double x) |
|
static bool | IsPositiveInfinity (double x) |
|
static bool | IsUnset (double x) |
|
static bool | IsValid (double x) |
| All nans, +infinity, -infinity, x <= than ON_DBL::Unset and x >= ON_DBL::PositiveUnset are considered invalid because using them in typical calculations almost always returns useless results. More...
|
|
static int | Sign (double x) |
|
◆ Compare()
static int ON_DBL::Compare |
( |
const double * |
lhs, |
|
|
const double * |
rhs |
|
) |
| |
|
static |
Well ordered compare that handles nullpt and nans and sorts them to the end. ON_DBL::Compare(nullptr, nullptr) = 0; ON_DBL::Compare(not nullptr, nullptr) = -1; ON_DBL::Compare(nullptr, not nullptr) = +1; ON_DBL::Compare(not nullptr, not nullptr) = ON_DBL::CompareValue(*lhs,*rhs);
- Parameters
-
- Returns
◆ CompareValue()
static int ON_DBL::CompareValue |
( |
double |
lhs, |
|
|
double |
rhs |
|
) |
| |
|
static |
Well ordered compare that handles nans and sorts them to the end. ON_DBL::CompareValue(nan, nan) = 0; ON_DBL::CompareValue(non_nan, nan) = -1; ON_DBL::CompareValue(nan, non_nan) = +1;
- Parameters
-
- Returns
- -1 if lhs < rhs or IsNotNan(lhs) and IsNan(rhs). 0 if lhs == rhs or IsNan(lhs) && IsNan(rhs). +1 if lhs > rhs or IsNotNan(lhs) && IsNan(rhs).
◆ IsInfinity()
static bool ON_DBL::IsInfinity |
( |
double |
x | ) |
|
|
static |
- Parameters
-
- Returns
- True if x is any type of infinity (positive, negative, projective).
◆ IsNan()
static bool ON_DBL::IsNan |
( |
double |
x | ) |
|
|
static |
- Parameters
-
- Returns
- True if x is any type of nan (signaling or quiet).
◆ IsNegativeInfinity()
static bool ON_DBL::IsNegativeInfinity |
( |
double |
x | ) |
|
|
static |
◆ IsNotNan()
static bool ON_DBL::IsNotNan |
( |
double |
x | ) |
|
|
static |
- Parameters
-
- Returns
- True if x is not a nan..
◆ IsPositiveInfinity()
static bool ON_DBL::IsPositiveInfinity |
( |
double |
x | ) |
|
|
static |
◆ IsUnset()
static bool ON_DBL::IsUnset |
( |
double |
x | ) |
|
|
static |
◆ IsValid()
static bool ON_DBL::IsValid |
( |
double |
x | ) |
|
|
static |
◆ Sign()
static int ON_DBL::Sign |
( |
double |
x | ) |
|
|
static |
- Parameters
-
- Returns
- If x > 0, then +1 is returned. If x < 0, then -1 is returned. Otherwise 0 is returned.
◆ Nan
◆ NegativeInfinity
const double ON_DBL::NegativeInfinity |
|
static |
◆ NegativeMax
const double ON_DBL::NegativeMax |
|
static |
◆ NegativeMin
const double ON_DBL::NegativeMin |
|
static |
◆ PositiveInfinity
const double ON_DBL::PositiveInfinity |
|
static |
◆ PositiveMax
const double ON_DBL::PositiveMax |
|
static |
◆ PositiveMin
const double ON_DBL::PositiveMin |
|
static |
◆ PositiveUnset
const double ON_DBL::PositiveUnset |
|
static |
◆ Unset
const double ON_DBL::Unset |
|
static |