Browse Source

fixed some trigonometry shenanigans

devel
Ludovic 'Archivist' Lagouardette 4 years ago
parent
commit
26ae913f1a
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      include/gp/math/fp_math.hpp

+ 13
- 1
include/gp/math/fp_math.hpp View File

@ -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;

Loading…
Cancel
Save