From 1694f5cb89e98ee7e1df45188c3888005158cfc8 Mon Sep 17 00:00:00 2001 From: kichikuou Date: Wed, 15 Feb 2023 15:30:41 +0900 Subject: [PATCH] Add Math.tan --- src/hll/Math.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hll/Math.c b/src/hll/Math.c index 04f90f7..e6a263a 100644 --- a/src/hll/Math.c +++ b/src/hll/Math.c @@ -59,6 +59,11 @@ static float Math_Sin(float x) return sinf(deg2rad(x)); } +static float Math_Tan(float x) +{ + return tanf(deg2rad(x)); +} + static void Math_SetSeedByCurrentTime(void) { srand(time(NULL)); @@ -180,6 +185,7 @@ static bool Math_BezierCurve(struct page **x_array, struct page **y_array, int n HLL_LIBRARY(Math, HLL_EXPORT(Cos, Math_Cos), HLL_EXPORT(Sin, Math_Sin), + HLL_EXPORT(Tan, Math_Tan), HLL_EXPORT(Sqrt, sqrtf), HLL_EXPORT(Atan, atanf), HLL_EXPORT(Atan2, atan2f),