add example darkroom/two_spheres.hpp

This commit is contained in:
bolero-MURAKAMI 2013-09-20 02:40:19 +09:00
parent 67c643820e
commit 3713351e3e
4 changed files with 103 additions and 4 deletions

View file

@ -120,6 +120,7 @@ namespace sprout {
}
//
// root_two
// root_three
// half_root_two
//
template<typename T>
@ -127,6 +128,10 @@ namespace sprout {
return 1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623L;
}
template<typename T>
inline SPROUT_CONSTEXPR T root_three() {
return 1.73205080756887729352744634150587236694280525381038062805580697945193301690880003708114618675724857567562614142L;
}
template<typename T>
inline SPROUT_CONSTEXPR T half_root_two() {
return 0.707106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115L;
}