module
approx_equal()Checks if floating-point values are approximately equal.
Functions
-
template <typename S, typename T>auto approx_equal(const bounding_box<S>& bb1, const bounding_box<T>& bb2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
- Returns true if two bounding boxes are approximately equal.
-
template <typename S, typename T>auto approx_equal(const bounding_sphere<S>& bs1, const bounding_sphere<T>& bs2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
- Returns true if two bounding spheres are approximately equal.
- auto approx_equal(half a, half b, half epsilon = constants<half>::default_epsilon) -> bool constexpr noexcept
- Returns true if two half-precision floats are approximately equal.
-
template <typename S, typename T>auto approx_equal(const line_segment<S>& seg1, const line_segment<T>& seg2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
- Returns true if two line segments are approximately equal.
- auto approx_equal(float a, float b, float epsilon = default_epsilon<float>) -> bool constexpr noexcept
- Returns true if two floats are approximately equal.
- auto approx_equal(double a, double b, double epsilon = default_epsilon<double>) -> bool constexpr noexcept
- Returns true if two doubles are approximately equal.
- auto approx_equal(long double a, long double b, long double epsilon = default_epsilon<long double>) -> bool constexpr noexcept
- Returns true if two long doubles are approximately equal.
- auto approx_equal(float128_t a, float128_t b, float128_t epsilon = default_epsilon<float128_t>) -> bool constexpr noexcept
- Returns true if two float128_ts are approximately equal.
- auto approx_equal(_Float16 a, _Float16 b, _Float16 epsilon = default_epsilon<_Float16>) -> bool constexpr noexcept
- Returns true if two _Float16s are approximately equal.
-
template <typename T, typename U>auto approx_equal(T a, U b) -> bool constexpr noexcept
- Returns true if two scalar values are approximately equal.
- auto approx_equal(const matrix<S, R, C>& m1, const matrix<T, R, C>& m2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
- Returns true if two matrices are approximately equal.
-
template <typename S, typename T>auto approx_equal(const oriented_bounding_box<S>& bb1, const oriented_bounding_box<T>& bb2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
- Returns true if two oriented bounding boxes are approximately equal.
-
template <typename S, typename T>auto approx_equal(const plane<S>& p1, const plane<T>& p2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
- Returns true if two planes are approximately equal.
-
template <typename S, typename T>auto approx_equal(const quaternion<S>& q1, const quaternion<T>& q2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
- Returns true if two quaternions are approximately equal.
-
template <typename S, typename T>auto approx_equal(const ray<S>& ray1, const ray<T>& ray2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
- Returns true if two rays are approximately equal.
-
template <typename S, typename T>auto approx_equal(const triangle<S>& tri1, const triangle<T>& tri2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
- Returns true if two triangles are approximately equal.
-
template <typename S, typename T, size_t D>auto approx_equal(const vector<S, D>& v1, const vector<T, D>& v2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
- Returns true if two vectors are approximately equal.
Function documentation
#include <muu/bounding_box.h>
template <typename S, typename T>
bool approx_equal(const bounding_box<S>& bb1,
const bounding_box<T>& bb2,
epsilon_type<S, T> epsilon = default_epsilon<S, T>) constexpr noexcept
Returns true if two bounding boxes are approximately equal.
#include <muu/bounding_sphere.h>
template <typename S, typename T>
bool approx_equal(const bounding_sphere<S>& bs1,
const bounding_sphere<T>& bs2,
epsilon_type<S, T> epsilon = default_epsilon<S, T>) constexpr noexcept
Returns true if two bounding spheres are approximately equal.
bool approx_equal(half a,
half b,
half epsilon = constants<half>::default_epsilon) constexpr noexcept
#include <muu/half.h>
Returns true if two half-precision floats are approximately equal.
#include <muu/line_segment.h>
template <typename S, typename T>
bool approx_equal(const line_segment<S>& seg1,
const line_segment<T>& seg2,
epsilon_type<S, T> epsilon = default_epsilon<S, T>) constexpr noexcept
Returns true if two line segments are approximately equal.
bool approx_equal(float a,
float b,
float epsilon = default_epsilon<float>) constexpr noexcept
#include <muu/math.h>
Returns true if two floats are approximately equal.
bool approx_equal(double a,
double b,
double epsilon = default_epsilon<double>) constexpr noexcept
#include <muu/math.h>
Returns true if two doubles are approximately equal.
bool approx_equal(long double a,
long double b,
long double epsilon = default_epsilon<long double>) constexpr noexcept
#include <muu/math.h>
Returns true if two long doubles are approximately equal.
bool approx_equal(float128_t a,
float128_t b,
float128_t epsilon = default_epsilon<float128_t>) constexpr noexcept
#include <muu/math.h>
Returns true if two float128_ts are approximately equal.
bool approx_equal(_Float16 a,
_Float16 b,
_Float16 epsilon = default_epsilon<_Float16>) constexpr noexcept
#include <muu/math.h>
Returns true if two _Float16s are approximately equal.
#include <muu/math.h>
template <typename T, typename U>
bool approx_equal(T a,
U b) constexpr noexcept
Returns true if two scalar values are approximately equal.
#include <muu/matrix.h>
bool approx_equal(const matrix<S, R, C>& m1,
const matrix<T, R, C>& m2,
epsilon_type<S, T> epsilon = default_epsilon<S, T>) constexpr noexcept
Returns true if two matrices are approximately equal.
#include <muu/oriented_bounding_box.h>
template <typename S, typename T>
bool approx_equal(const oriented_bounding_box<S>& bb1,
const oriented_bounding_box<T>& bb2,
epsilon_type<S, T> epsilon = default_epsilon<S, T>) constexpr noexcept
Returns true if two oriented bounding boxes are approximately equal.
#include <muu/plane.h>
template <typename S, typename T>
bool approx_equal(const plane<S>& p1,
const plane<T>& p2,
epsilon_type<S, T> epsilon = default_epsilon<S, T>) constexpr noexcept
Returns true if two planes are approximately equal.
#include <muu/quaternion.h>
template <typename S, typename T>
bool approx_equal(const quaternion<S>& q1,
const quaternion<T>& q2,
epsilon_type<S, T> epsilon = default_epsilon<S, T>) constexpr noexcept
Returns true if two quaternions are approximately equal.
#include <muu/ray.h>
template <typename S, typename T>
bool approx_equal(const ray<S>& ray1,
const ray<T>& ray2,
epsilon_type<S, T> epsilon = default_epsilon<S, T>) constexpr noexcept
Returns true if two rays are approximately equal.
#include <muu/triangle.h>
template <typename S, typename T>
bool approx_equal(const triangle<S>& tri1,
const triangle<T>& tri2,
epsilon_type<S, T> epsilon = default_epsilon<S, T>) constexpr noexcept
Returns true if two triangles are approximately equal.
#include <muu/vector.h>
template <typename S, typename T, size_t D>
bool approx_equal(const vector<S, D>& v1,
const vector<T, D>& v2,
epsilon_type<S, T> epsilon = default_epsilon<S, T>) constexpr noexcept
Returns true if two vectors are approximately equal.