You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had to write my own min and max functions that take in two &Vector3 and compute a new vector containing the minimum components of the two vectors (and the max for the max function). Is there something like this already in nalgebra? max/min and partial_max/partial_min did not seem to do what I want. If this is something that would be beneficial to the library I would be happy to add it.
The text was updated successfully, but these errors were encountered:
Hi! There are currently two ways of doing this in nalgebra:
Using zip_map, i.e., vector1.zip_map(&vector2, |a, b| a.min(b))
nalgebra::inf(&a, &b) for componentwise min or nalgebra::sup(&a, &b) for componentwise max. The inf and sup operations are what is called the supremum and the infimum.
I agree it wouldn't hurt to have component_min and component_max too for clarity (in the base/componentwise.rs file).
I had to write my own min and max functions that take in two &Vector3 and compute a new vector containing the minimum components of the two vectors (and the max for the max function). Is there something like this already in nalgebra? max/min and partial_max/partial_min did not seem to do what I want. If this is something that would be beneficial to the library I would be happy to add it.
The text was updated successfully, but these errors were encountered: