godot/thirdparty/embree/common/math/constants.h

// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "../sys/platform.h"

#include <limits>

#define _USE_MATH_DEFINES
#include <math.h> // using cmath causes issues under Windows
#include <cfloat>
#include <climits>

namespace embree
{
  static MAYBE_UNUSED const float one_over_255 =;
  static MAYBE_UNUSED const float min_rcp_input =;  // for abs(x) >= min_rcp_input the newton raphson rcp calculation does not fail

  /* we consider floating point numbers in that range as valid input numbers */
  static MAYBE_UNUSED float FLT_LARGE =;

  struct TrueTy {};

  const constexpr TrueTy True =;

  struct FalseTy {};

  const constexpr FalseTy False =;
  
  struct ZeroTy
  {}; 

  const constexpr ZeroTy zero =;

  struct OneTy
  {};

  const constexpr OneTy one =;

  struct NegInfTy
  {};

  const constexpr NegInfTy neg_inf =;

  struct PosInfTy
  {};

  const constexpr PosInfTy     inf =;
  const constexpr PosInfTy pos_inf =;

  struct NaNTy
  {};

  const constexpr NaNTy nan =;

  struct UlpTy
  {};
  
  const constexpr UlpTy ulp =;

  struct PiTy
  {};

  const constexpr PiTy pi =;

  struct OneOverPiTy
  {};

  const constexpr OneOverPiTy one_over_pi =;

  struct TwoPiTy
  {};

  const constexpr TwoPiTy two_pi =;

  struct OneOverTwoPiTy
  {};

  const constexpr OneOverTwoPiTy one_over_two_pi =;

  struct FourPiTy
  {};

  const constexpr FourPiTy four_pi =;

  struct OneOverFourPiTy
  {};

  const constexpr OneOverFourPiTy one_over_four_pi =;

  struct StepTy {};

  const constexpr StepTy step =;

  struct ReverseStepTy {};

  const constexpr ReverseStepTy reverse_step =;

  struct EmptyTy {};

  const constexpr EmptyTy empty =;

  struct FullTy {};

  const constexpr FullTy full =;

  struct UndefinedTy {};

  const constexpr UndefinedTy undefined =;
}