Squashed 'kiwi/' content from commit 268028e
git-subtree-dir: kiwi git-subtree-split: 268028ee4a694dcd89e4b1e683bf2f9ac48c08d9
This commit is contained in:
24
kiwi/util.h
Normal file
24
kiwi/util.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*-----------------------------------------------------------------------------
|
||||
| Copyright (c) 2013-2017, Nucleic Development Team.
|
||||
|
|
||||
| Distributed under the terms of the Modified BSD License.
|
||||
|
|
||||
| The full license is in the file LICENSE, distributed with this software.
|
||||
|----------------------------------------------------------------------------*/
|
||||
#pragma once
|
||||
|
||||
namespace kiwi
|
||||
{
|
||||
|
||||
namespace impl
|
||||
{
|
||||
|
||||
inline bool nearZero(double value)
|
||||
{
|
||||
const double eps = 1.0e-8;
|
||||
return value < 0.0 ? -value < eps : value < eps;
|
||||
}
|
||||
|
||||
} // namespace impl
|
||||
|
||||
} // namespace kiwi
|
||||
Reference in New Issue
Block a user