5#ifndef FLUTTER_IMPELLER_GEOMETRY_SCALAR_H_
6#define FLUTTER_IMPELLER_GEOMETRY_SCALAR_H_
20template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
22 return val >=
T{} ? val : -val;
constexpr float kEhCloseEnough
constexpr bool ScalarNearlyZero(Scalar x, Scalar tolerance=kEhCloseEnough)
constexpr bool ScalarNearlyEqual(Scalar x, Scalar y, Scalar tolerance=kEhCloseEnough)
constexpr T Absolute(const T &val)
constexpr Degrees()=default
constexpr Degrees(Scalar p_degrees)
constexpr Radians()=default
constexpr Radians(Scalar p_radians)