rad
This commit is contained in:
parent
a56705383f
commit
898c13f70e
3 changed files with 8 additions and 2 deletions
|
|
@ -40,6 +40,12 @@ impl Point {
|
|||
bearing
|
||||
}
|
||||
|
||||
pub fn bearing_rad(&self, point: Point) -> f32 {
|
||||
let delta_x = point.x - self.x;
|
||||
let delta_y = point.y - self.y;
|
||||
delta_y.atan2(delta_x)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl From<Point> for Coord<f32> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue