I always multiply instead of dividing... So if you want to make something half size use x * .5 rather than x / 2.
Using this method you will never get division by 0 and multiplying by 0 gives a result of 0 safely.
That's a neat solution when you know the divisor, but what about a situation like this? :Using this method you will never get division by 0 and multiplying by 0 gives a result of 0 safely.
ratio# = mesh_height# / mesh_width#
What you're getting is Nan = Not a number. In my opinion it's best to avoid all divisions by 0. While you may not get a MAV strange & unexpected things can start happening.
Hmm, is Infinity the same as NaN? When I print the value it says 'Infinity' not NaN. I know using NaN can cause weird things but I haven't noticed anything odd during testing. It almost seems as Infinity is treated as an extremely small fraction, which is basically what I want. :)