20 #ifndef ANTKEEPER_PHYSICS_LIGHT_VMAG_HPP
21 #define ANTKEEPER_PHYSICS_LIGHT_VMAG_HPP
43 static constexpr T fifth_root_100 = T{2.5118864315095801110850320677993};
44 return std::pow(fifth_root_100, -mv);
58 return std::pow(T{10}, (T{-14.18} - mv) * T{0.4});
72 return T{-14.18} - T{2.5} * std::log10(ev);
consteval T pow(T x, T e) noexcept
Compile-time pow for unsigned integrals.
T from_illuminance(T ev)
Converts illuminance to apparent magnitude.
T to_brightness(T mv)
Converts apparent magnitude to a brightness factor relative to a 0th magnitude star.
T to_illuminance(T mv)
Converts apparent magnitude to illuminance.