vector: add almost_equal specialisation
This commit is contained in:
parent
3da59aea2f
commit
4aa35f4c70
@ -248,3 +248,9 @@ namespace util {
|
||||
template <> vector<4,double> random (void) { util::vector<4,double> out; randomise (out.data); return out; }
|
||||
}
|
||||
|
||||
template <>
|
||||
bool
|
||||
almost_equal [[gnu::pure]] (const util::vector2f &a, const util::vector2f &b)
|
||||
{
|
||||
return std::equal (a.begin (), a.end (), b.begin (), almost_equal<float>);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user