| 1 |
/*----------------------------------------------------------------------------- |
| 2 |
| Copyright (c) 2013-2026, Nucleic Development Team. |
| 3 |
| |
| 4 |
| Distributed under the terms of the Modified BSD License. |
| 5 |
| |
| 6 |
| The full license is in the file LICENSE, distributed with this software. |
| 7 |
|----------------------------------------------------------------------------*/ |
| 8 |
#pragma once |
| 9 |
|
| 10 |
namespace kiwi |
| 11 |
{ |
| 12 |
|
| 13 |
namespace impl |
| 14 |
{ |
| 15 |
|
| 16 |
inline bool nearZero(double value) |
| 17 |
{ |
| 18 |
const double eps = 1.0e-8; |
| 19 |
return value < 0.0 ? -value < eps : value < eps; |
| 20 |
} |
| 21 |
|
| 22 |
} // namespace impl |
| 23 |
|
| 24 |
} // namespace kiwi |