From 26ae913f1aa777b95b01316e7e0f96c09cd500de Mon Sep 17 00:00:00 2001 From: Ludovic 'Archivist' Lagouardette Date: Wed, 9 Sep 2020 23:26:00 +0200 Subject: [PATCH] fixed some trigonometry shenanigans --- include/gp/math/fp_math.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/gp/math/fp_math.hpp b/include/gp/math/fp_math.hpp index 0275639..7417920 100644 --- a/include/gp/math/fp_math.hpp +++ b/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/2); + return sin(v+pi/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 float isqrt(float v) { int32_t i;