From 9445fa599c1ed7712d9dc97107c31ce396e9f6d5 Mon Sep 17 00:00:00 2001 From: Henrixounez Date: Sun, 23 Jun 2019 10:44:36 +0200 Subject: [PATCH] math: radians to degrees function --- math/math.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/math/math.v b/math/math.v index 40684eb2e0..55e380db5f 100644 --- a/math/math.v +++ b/math/math.v @@ -65,6 +65,10 @@ fn radians(degrees f64) f64 { return degrees * (PI / 180.0) } +fn degrees(radians f64) f64 { + return radians * (180.0 / PI) +} + fn round(f f64) f64 { return C.round(f) }