dimforge / nalgebra

Linear algebra library for Rust.
https://nalgebra.org
Apache License 2.0
4.04k stars 485 forks source link

Implement From<Point<T>> for Vector<T> #1460

Open jnyfah opened 1 week ago

jnyfah commented 1 week ago

This PR addresses issue #1450

Changes made:

  1. Restricted the existing homogeneous conversion to specific 2D/3D cases

    • Point2 -> Vector3 (homogeneous)
    • Point3 -> Vector4 (homogeneous)
  2. Added generic dimension-preserving conversion

  3. Added tests for both conversion types