mirror of
https://github.com/iceHtwoO/novaOS.git
synced 2026-04-17 04:32:27 +00:00
6 lines
157 B
Rust
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)
|
|
}
|