coord: relax restrictions on is_normalised
This commit is contained in:
parent
8a2055abfc
commit
fe88708c50
@ -818,7 +818,12 @@ namespace util {
|
|||||||
bool
|
bool
|
||||||
is_normalised (const K &k)
|
is_normalised (const K &k)
|
||||||
{
|
{
|
||||||
return almost_equal (norm2 (k), typename K::value_type{1});
|
using value_type = typename K::value_type;
|
||||||
|
constexpr auto hi = value_type (1.00001);
|
||||||
|
constexpr auto lo = value_type (0.99999);
|
||||||
|
|
||||||
|
const auto n2 = norm2 (k);
|
||||||
|
return n2 < hi && n2 > lo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user