Add a NearZero for temporary values
This commit is contained in:
parent
0d4b700546
commit
57f3154986
1 changed files with 12 additions and 0 deletions
12
src/basics.h
12
src/basics.h
|
@ -52,6 +52,18 @@ NearZero(Double& value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Same as NearZero, but for temporary values.
|
||||||
|
*
|
||||||
|
* @see NearZero
|
||||||
|
*/
|
||||||
|
inline bool
|
||||||
|
NearZero(Double&& value)
|
||||||
|
{
|
||||||
|
return std::fabs(value) < EPSILON;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
TooFar(Double& value)
|
TooFar(Double& value)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue