#ifndef SkFloatingPoint_DEFINED
#define SkFloatingPoint_DEFINED
#include "include/private/base/SkAttributes.h"
#include "include/private/base/SkMath.h"
#include <cmath>
#include <cstdint>
#include <limits>
#include <type_traits>
inline constexpr float SK_FloatSqrt2 = …;
inline constexpr float SK_FloatPI = …;
inline constexpr double SK_DoublePI = …;
static constexpr int sk_float_sgn(float x) { … }
static constexpr float sk_float_degrees_to_radians(float degrees) { … }
static constexpr float sk_float_radians_to_degrees(float radians) { … }
#define sk_float_round(x) …
template <typename T, std::enable_if_t<std::is_floating_point_v<T>, bool> = true>
static inline constexpr bool SkIsNaN(T x) { … }
template <typename T, typename... Pack, std::enable_if_t<std::is_floating_point_v<T>, bool> = true>
static inline bool SkIsFinite(T x, Pack... values) { … }
template <typename T, std::enable_if_t<std::is_floating_point_v<T>, bool> = true>
static inline bool SkIsFinite(const T array[], int count) { … }
inline constexpr int SK_MaxS32FitsInFloat = …;
inline constexpr int SK_MinS32FitsInFloat = …;
inline constexpr int64_t SK_MaxS64FitsInFloat = …;
inline constexpr int64_t SK_MinS64FitsInFloat = …;
#if defined(_MSC_VER) && !defined(__clang__)
#define SK_CHECK_NAN …
#else
#define SK_CHECK_NAN …
#endif
static constexpr int sk_float_saturate2int(float x) { … }
static constexpr int sk_double_saturate2int(double x) { … }
static constexpr int64_t sk_float_saturate2int64(float x) { … }
#undef SK_CHECK_NAN
#define sk_float_floor2int(x) …
#define sk_float_round2int(x) …
#define sk_float_ceil2int(x) …
#define sk_float_floor2int_no_saturate(x) …
#define sk_float_round2int_no_saturate(x) …
#define sk_float_ceil2int_no_saturate(x) …
#define sk_double_round(x) …
#define sk_double_floor2int(x) …
#define sk_double_round2int(x) …
#define sk_double_ceil2int(x) …
SK_NO_SANITIZE("float-cast-overflow")
static constexpr float sk_double_to_float(double x) { … }
inline constexpr float SK_FloatNaN = …;
inline constexpr float SK_FloatInfinity = …;
inline constexpr float SK_FloatNegativeInfinity = …;
inline constexpr double SK_DoubleNaN = …;
static constexpr float sk_float_midpoint(float a, float b) { … }
static inline float sk_float_rsqrt_portable(float x) { … }
static inline float sk_float_rsqrt (float x) { … }
#ifdef SK_BUILD_FOR_WIN
#pragma warning(push)
#pragma warning(disable : 4723)
#endif
SK_NO_SANITIZE("float-divide-by-zero")
static constexpr float sk_ieee_float_divide(float numer, float denom) { … }
SK_NO_SANITIZE("float-divide-by-zero")
static constexpr double sk_ieee_double_divide(double numer, double denom) { … }
#ifdef SK_BUILD_FOR_WIN
#pragma warning( pop )
#endif
bool sk_double_nearly_zero(double a);
bool sk_doubles_nearly_equal_ulps(double a, double b, uint8_t maxUlpsDiff = 16);
#endif