Carp/core/Geometry.carp

11 lines
409 B
Plaintext
Raw Permalink Normal View History

2021-07-05 15:48:35 +03:00
(doc Geometry "provides numerical geometrical operations.")
2017-10-20 01:44:25 +03:00
(defmodule Geometry
(doc degree-to-radians "converts degrees expressed as a double `n` into radians.")
2017-10-20 01:44:25 +03:00
(defn degree-to-radians [n]
2019-09-09 23:08:50 +03:00
(* n (/ pi (Generics.one-hundred-eighty))))
2017-10-20 01:44:25 +03:00
(doc radians-to-degree "converts radians expressed as a double `n` into degrees.")
2017-10-20 01:44:25 +03:00
(defn radians-to-degree [n]
2019-09-09 23:08:50 +03:00
(* n (/ (Generics.one-hundred-eighty) pi)))
)