servo / euclid

Geometry primitives (basic linear algebra) for Rust
Other
462 stars 102 forks source link

Euclidean constructor #437

Closed gnxlxnxx closed 3 years ago

gnxlxnxx commented 4 years ago

Is there a constructor which takes a euclidean vector (angle and magnitude) to construct a Vector, because I can't find one?

If not that'd be a great enhancement.

nical commented 4 years ago

Sounds like Vector2D::from_angle_and_length(Angle<T>, T) -> Self and 3D equivalent would be a useful addition.

gnxlxnxx commented 4 years ago

exactly