#ifndef SPROUT_COMPOST_UTILITY_EQUAL_TEMPERAMENT_HPP #define SPROUT_COMPOST_UTILITY_EQUAL_TEMPERAMENT_HPP #include #include #include namespace sprout { namespace compost { // // equal_temperament_value // template SPROUT_CONSTEXPR typename sprout::float_promote::type equal_temperament_value(ArithmeticType1 i, ArithmeticType2 div) { typedef typename sprout::float_promote::type type; using sprout::pow; return pow(type(2), type(i) / type(div)); } template SPROUT_CONSTEXPR typename sprout::float_promote::type equal_temperament_value(ArithmeticType i) { return sprout::compost::equal_temperament_value(i, 12); } } // namespace compost } // namespace sprout #endif // #ifndef SPROUT_COMPOST_UTILITY_EQUAL_TEMPERAMENT_HPP