mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-05 04:44:12 +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)))
|
|
)
|