-
-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Into/From traits to transform Point's into array's #286
Comments
I gave this a shot; here's what happened. TL;DR: I probably should have heeded @icefoxen's warning:
Anyways, first, to expand @icefoxen's explanation, the state of nalgebra is that matrix/array conversions are smooth in both directions: let matrix : VectorN<f32, U3> = [1., 2., 3.,].into();
let array: [f32; 3] = matrix.into(); ...but this does not yet work for let point : PointN<f32, U3> = [1., 2., 3.,].into();
let array: [f32; 3] = point.into(); The matrix/array conversions are possible due to lots of codegen. Approach 1: More CodegenOne solution is to perform similar codegen for Approach 2: Impl MadnessGiven that From
|
This issue was recently solved to a limited extent (for |
Similar to how Vector's have conversions to/from [N;2], [N;3] etc, it would be nice if Point's could have similar transformations.
I tried making a PR but I got tangled up in generics and traits. :-/
The text was updated successfully, but these errors were encountered: