MCPcopy Create free account
hub / github.com/angular-rust/ux-charts / polar2cartesian

Function polar2cartesian

src/utils.rs:33–37  ·  view source on GitHub ↗
(center: &Point<f64>, radius: f64, angle: f64)

Source from the content-addressed store, hash-verified

31}
32
33pub fn polar2cartesian(center: &Point<f64>, radius: f64, angle: f64) -> Point<f64> {
34 let x = center.x + radius * (angle).cos();
35 let y = center.y + radius * (angle).sin();
36 Point::new(x, y)
37}
38
39/// Rounds [value] to [places] decimal places.
40pub fn round2places(value: f64, places: usize) -> f64 {

Callers 6

drawMethod · 0.85
get_tooltip_positionMethod · 0.85
drawMethod · 0.85
draw_axes_and_gridMethod · 0.85
draw_channelsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected