Files
novaOS/src/math.rs

6 lines
157 B
Rust

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)
}