Skip to content

Commit 2279340

Browse files
tychedeliacatilac
authored andcommitted
Add math constants.
1 parent 9d83470 commit 2279340

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • crates/processing_pyo3/src

crates/processing_pyo3/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,10 @@ mod mewnala {
613613
const QUARTER_PI: f32 = std::f32::consts::FRAC_PI_4;
614614
#[pymodule_export]
615615
const TAU: f32 = std::f32::consts::TAU;
616+
#[pymodule_export]
617+
const DEG_TO_RAD: f32 = std::f32::consts::PI / 180.0;
618+
#[pymodule_export]
619+
const RAD_TO_DEG: f32 = 180.0 / std::f32::consts::PI;
616620

617621
// color space constants for color_mode()
618622
#[pymodule_export]

0 commit comments

Comments
 (0)