Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::math::radical_inverse_detail Namespace Reference

Functions

template<std::integral Value, std::integral Base>
constexpr Value reverse_limit (const Value nextDigit, const Base base)
 The max value x such that x * base + nextDigit will not overflow its type.
 
template<std::floating_point Result, std::integral Base>
constexpr auto num_meaningful_digits (const Base base)
 Number of reversed digits that will have effect on the type Result. Due to the limited precision of floating-point types, only a limited number of digits may have an effect on the final radical inversed value.
 
template<std::floating_point Result, std::unsigned_integral Value>
constexpr Result base_2_scaler ()
 

Function Documentation

◆ base_2_scaler()

template<std::floating_point Result, std::unsigned_integral Value>
Result ph::math::radical_inverse_detail::base_2_scaler ( )
inlineconstexpr

◆ num_meaningful_digits()

template<std::floating_point Result, std::integral Base>
auto ph::math::radical_inverse_detail::num_meaningful_digits ( const Base base)
inlineconstexpr

Number of reversed digits that will have effect on the type Result. Due to the limited precision of floating-point types, only a limited number of digits may have an effect on the final radical inversed value.

◆ reverse_limit()

template<std::integral Value, std::integral Base>
Value ph::math::radical_inverse_detail::reverse_limit ( const Value nextDigit,
const Base base )
inlineconstexpr

The max value x such that x * base + nextDigit will not overflow its type.