MCPcopy Create free account
hub / github.com/Notgnoshi/generative / from_polar

Function from_polar

tools/transform.rs:226–230  ·  view source on GitHub ↗
(coord: Coord)

Source from the content-addressed store, hash-verified

224}
225
226fn from_polar(coord: Coord) -> Coord {
227 let r = coord.x;
228 let theta = coord.y;
229 coord! { x: r * f64::cos(theta), y: r * f64::sin(theta) }
230}
231
232fn to_polar(coord: Coord) -> Coord {
233 let r = f64::sqrt(coord.x.powi(2) + coord.y.powi(2));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected