mirror of
https://github.com/iceHtwoO/novaOS.git
synced 2026-04-17 04:32:27 +00:00
Draw a line in each direction
This commit is contained in:
5
src/math.rs
Normal file
5
src/math.rs
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user