+
+ /// Returns the perpendicular projection of this vector on a line with the specified angle.
+ pub fn project_onto(&self, angle: Angle) -> Point<f64> {
+ let dot_product = self.length() * (self.to_angle() - angle).to_radians().cos();
+ Point::from(angle) * dot_product
+ }