stub constraint-based packer for canvas

This commit is contained in:
Paul Davis 2020-05-20 22:29:07 -06:00
parent 33cb376c68
commit 539e1a1f1b
20 changed files with 141 additions and 0 deletions

24
libs/canvas/kiwi/util.h Normal file
View 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