Math » approx_zero() module

Checks if floating-point values are approximately equal to zero.

Functions

template <typename S>
auto approx_zero(const bounding_box<S>& bb, S epsilon = default_epsilon<S>) -> bool constexpr noexcept
Returns true if all the scalar components of a bounding box are approximately equal to zero.
template <typename S>
auto approx_zero(const bounding_sphere<S>& bs, S epsilon = default_epsilon<S>) -> bool constexpr noexcept
Returns true if all the scalar components of a bounding sphere are approximately equal to zero.
auto approx_zero(half x, half epsilon = constants<half>::default_epsilon) -> bool constexpr noexcept
Returns true a half-precision float is approximately equal to zero.
template <typename S>
auto approx_zero(const line_segment<S>& seg, S epsilon = default_epsilon<S>) -> bool constexpr noexcept
Returns true if all the points in line segment are approximately equal to zero.
auto approx_zero(float x, float epsilon = default_epsilon<float>) -> bool constexpr noexcept
Returns true if a float is approximately equal to zero.
auto approx_zero(double x, double epsilon = default_epsilon<double>) -> bool constexpr noexcept
Returns true if a double is approximately equal to zero.
auto approx_zero(long double x, long double epsilon = default_epsilon<long double>) -> bool constexpr noexcept
Returns true if a long double is approximately equal to zero.
auto approx_zero(float128_t x, float128_t epsilon = default_epsilon<float128_t>) -> bool constexpr noexcept
Returns true if a float128_t is approximately equal to zero.
auto approx_zero(_Float16 x, _Float16 epsilon = default_epsilon<_Float16>) -> bool constexpr noexcept
Returns true if a _Float16 is approximately equal to zero.
template <typename T>
auto approx_zero(T x) -> bool constexpr noexcept
Returns true if a scalar value is approximately equal to zero.
template <typename S, size_t R, size_t C>
auto approx_zero(const matrix<S, R, C>& m, S epsilon = default_epsilon<S>) -> bool constexpr noexcept
Returns true if all the scalar components of a matrix are approximately equal to zero.
template <typename S>
auto approx_zero(const oriented_bounding_box<S>& bb, S epsilon = default_epsilon<S>) -> bool constexpr noexcept
Returns true if all the scalar components of an oriented bounding box are approximately equal to zero.
template <typename S>
auto approx_zero(const plane<S>& p, S epsilon = default_epsilon<S>) -> bool constexpr noexcept
Returns true if all the scalar components of a plane are approximately equal to zero.
template <typename S>
auto approx_zero(const quaternion<S>& q, S epsilon = default_epsilon<S>) -> bool constexpr noexcept
Returns true if all the scalar components of a quaternion are approximately equal to zero.
template <typename S>
auto approx_zero(const triangle<S>& tri, S epsilon = default_epsilon<S>) -> bool constexpr noexcept
Returns true if all the points in triangle are approximately equal to zero.
template <typename S, size_t D>
auto approx_zero(const vector<S, D>& v, S epsilon = default_epsilon<S>) -> bool constexpr noexcept
Returns true if all the scalar components of a vector are approximately equal to zero.

Function documentation

template <typename S>
bool approx_zero(const bounding_box<S>& bb, S epsilon = default_epsilon<S>) constexpr noexcept

Returns true if all the scalar components of a bounding box are approximately equal to zero.

template <typename S>
bool approx_zero(const bounding_sphere<S>& bs, S epsilon = default_epsilon<S>) constexpr noexcept

Returns true if all the scalar components of a bounding sphere are approximately equal to zero.

bool approx_zero(half x, half epsilon = constants<half>::default_epsilon) constexpr noexcept
#include <muu/half.h>

Returns true a half-precision float is approximately equal to zero.

template <typename S>
bool approx_zero(const line_segment<S>& seg, S epsilon = default_epsilon<S>) constexpr noexcept

Returns true if all the points in line segment are approximately equal to zero.

bool approx_zero(float x, float epsilon = default_epsilon<float>) constexpr noexcept
#include <muu/math.h>

Returns true if a float is approximately equal to zero.

bool approx_zero(double x, double epsilon = default_epsilon<double>) constexpr noexcept
#include <muu/math.h>

Returns true if a double is approximately equal to zero.

bool approx_zero(long double x, long double epsilon = default_epsilon<long double>) constexpr noexcept
#include <muu/math.h>

Returns true if a long double is approximately equal to zero.

bool approx_zero(float128_t x, float128_t epsilon = default_epsilon<float128_t>) constexpr noexcept
#include <muu/math.h>

Returns true if a float128_t is approximately equal to zero.

bool approx_zero(_Float16 x, _Float16 epsilon = default_epsilon<_Float16>) constexpr noexcept
#include <muu/math.h>

Returns true if a _Float16 is approximately equal to zero.

#include <muu/math.h>
template <typename T>
bool approx_zero(T x) constexpr noexcept

Returns true if a scalar value is approximately equal to zero.

template <typename S, size_t R, size_t C>
bool approx_zero(const matrix<S, R, C>& m, S epsilon = default_epsilon<S>) constexpr noexcept

Returns true if all the scalar components of a matrix are approximately equal to zero.

template <typename S>
bool approx_zero(const oriented_bounding_box<S>& bb, S epsilon = default_epsilon<S>) constexpr noexcept

Returns true if all the scalar components of an oriented bounding box are approximately equal to zero.

#include <muu/plane.h>
template <typename S>
bool approx_zero(const plane<S>& p, S epsilon = default_epsilon<S>) constexpr noexcept

Returns true if all the scalar components of a plane are approximately equal to zero.

template <typename S>
bool approx_zero(const quaternion<S>& q, S epsilon = default_epsilon<S>) constexpr noexcept

Returns true if all the scalar components of a quaternion are approximately equal to zero.

template <typename S>
bool approx_zero(const triangle<S>& tri, S epsilon = default_epsilon<S>) constexpr noexcept

Returns true if all the points in triangle are approximately equal to zero.

template <typename S, size_t D>
bool approx_zero(const vector<S, D>& v, S epsilon = default_epsilon<S>) constexpr noexcept

Returns true if all the scalar components of a vector are approximately equal to zero.