LLNL / axom

CS infrastructure components for HPC applications
BSD 3-Clause "New" or "Revised" License
152 stars 27 forks source link

Vector normalization #1332

Open adayton1 opened 4 months ago

adayton1 commented 4 months ago

Axom currently handles normalizing the zero vector (and tiny vectors) by returning {1, 0, 0}. Is this really the behavior we want?

I'll add a few thoughts to start:

kennyweiss commented 4 months ago

@agcapps suggested that adding PRIMAL_TINY to the denominator would follow the principle of least surprise and seems to match the expectations of our users.