Parcourir la source

fixed some trigonometry shenanigans

devel
Ludovic 'Archivist' Lagouardette il y a 4 ans
Parent
révision
26ae913f1a
1 fichiers modifiés avec 13 ajouts et 1 suppressions
  1. +13
    -1
      include/gp/math/fp_math.hpp

+ 13
- 1
include/gp/math/fp_math.hpp Voir le fichier

@ -154,9 +154,21 @@ namespace gp{
// TODO: replace with an actual implementation
double cos(double v) {
return sin(v+pi<float>/2);
return sin(v+pi<double>/2);
}
// TODO: replace with an actual implementation
float tan(float v) {
return sin(v)/cos(v);
}
// TODO: replace with an actual implementation
double tan(double v) {
return sin(v)/cos(v);
}
template<size_t cycles = 5>
float isqrt(float v) {
int32_t i;

Chargement…
Annuler
Enregistrer