Draw a line in each direction

This commit is contained in:
2025-07-27 11:03:52 +02:00
parent 80c4c3604c
commit a4250898c0
5 changed files with 24 additions and 2 deletions

5
src/math.rs Normal file
View File

@@ -0,0 +1,5 @@
pub fn polar_to_cartesian(r: f32, theta_rad: f32) -> (f32, f32) {
let x = r * libm::cosf(theta_rad);
let y = r * libm::sinf(theta_rad);
(x, y)
}