Carp/core/Geometry.carp
2019-09-09 22:08:50 +02:00

10 lines
349 B
Plaintext

(defmodule Geometry
(doc degree-to-radians "converts degrees expressed as a double `n` into radians.")
(defn degree-to-radians [n]
(* n (/ pi (Generics.one-hundred-eighty))))
(doc radians-to-degree "converts radians expressed as a double `n` into degrees.")
(defn radians-to-degree [n]
(* n (/ (Generics.one-hundred-eighty) pi)))
)