瀏覽代碼

fixed some trigonometry shenanigans

devel
Ludovic 'Archivist' Lagouardette 4 年之前
父節點
當前提交
26ae913f1a
共有 1 個檔案被更改,包括 13 行新增1 行删除
  1. +13
    -1
      include/gp/math/fp_math.hpp

+ 13
- 1
include/gp/math/fp_math.hpp 查看文件

@ -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…
取消
儲存