From 32d7ef977117682b19575bb936be7d0929ef17d6 Mon Sep 17 00:00:00 2001 From: Axanery <41282531+Axanery@users.noreply.github.com> Date: Wed, 12 Jun 2024 00:50:40 -0500 Subject: [PATCH] Fix ATan2 --- source/Engine/Bytecode/StandardLibrary.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Engine/Bytecode/StandardLibrary.cpp b/source/Engine/Bytecode/StandardLibrary.cpp index 184d3e96..ab8ce491 100644 --- a/source/Engine/Bytecode/StandardLibrary.cpp +++ b/source/Engine/Bytecode/StandardLibrary.cpp @@ -6870,7 +6870,7 @@ VMValue Math_ACos256(int argCount, VMValue* args, Uint32 threadID) { */ VMValue Math_ATan2(int argCount, VMValue* args, Uint32 threadID) { CHECK_ARGCOUNT(1); - return INTEGER_VAL(Math::ArcTanLookup((int)(GET_ARG(0, GetDecimal) * 65536.0f), (int)(GET_ARG(1, GetDecimal) * 65536.0f))); + return INTEGER_VAL((int)Math::ArcTanLookup((int)(GET_ARG(0, GetDecimal) * 65536.0f), (int)(GET_ARG(1, GetDecimal) * 65536.0f))); } /*** * RSDK.Math.RadianToInteger @@ -16719,6 +16719,7 @@ PUBLIC STATIC void StandardLibrary::Link() { DEF_NAMESPACED_NATIVE(Math, Tan256); DEF_NAMESPACED_NATIVE(Math, ASin256); DEF_NAMESPACED_NATIVE(Math, ACos256); + DEF_NAMESPACED_NATIVE(Math, ATan2); DEF_NAMESPACED_NATIVE(Math, RadianToInteger); DEF_NAMESPACED_NATIVE(Math, IntegerToRadian); DEF_NAMESPACED_NATIVE(Math, GetRandSeed);