From d98028d880406997aa044a86f7b46209217ac8c0 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 23 Feb 2023 05:57:54 -0500 Subject: [PATCH] RadiansToDegrees/DegreesToRadians --- BeefLibs/corlib/src/Math.bf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BeefLibs/corlib/src/Math.bf b/BeefLibs/corlib/src/Math.bf index 5e86a983..260916fd 100644 --- a/BeefLibs/corlib/src/Math.bf +++ b/BeefLibs/corlib/src/Math.bf @@ -140,6 +140,11 @@ namespace System public static extern float Round(float f); public static extern double Round(double a); + public static float RadiansToDegrees(float rad) => rad * (180.f / PI_f); + public static double RadiansToDegrees(double rad) => rad * (180.0 / PI_d); + public static float DegreesToRadians(float deg) => deg * (PI_f / 180.f); + public static double DegreesToRadians(double deg) => deg * (PI_d / 180.0); + public static float Round(float value, int32 digits) { if ((digits < 0) || (digits > cMaxDoubleRoundingDigits))