mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-17 16:38:14 +03:00
10 lines
349 B
Plaintext
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)))
|
|
)
|