pbpt
Loading...
Searching...
No Matches
global.hpp File Reference

Defines the primary floating-point type alias for the math library. More...

Go to the source code of this file.

Namespaces

namespace  pbpt::math
 The namespace for math library implementation.

Macros

#define EPSILON   1e-6
 The epsilon value used for floating-point comparisons.

Typedefs

using pbpt::math::Float = float
 The primary floating-point type used throughout the math library.

Detailed Description

Defines the primary floating-point type alias for the math library.

This header centralizes the floating-point precision for the entire pbpt::math namespace. By changing the definition here (or by defining FLOAT_64BIT in the build system), the precision of all calculations (in vectors, points, rays, etc.) can be switched between single and double precision.

Macro Definition Documentation

◆ EPSILON

#define EPSILON   1e-6

The epsilon value used for floating-point comparisons.

This value is used to determine the precision of floating-point comparisons. It is set to a small value (e.g., 1e-6) to account for floating-point precision issues.