Mapping humanity
Poll - 0 gedeeld door 0

most often i would rather have 0 as the outcome, than to get an error message...
added 1 as an option, i can image people would vote that because x / x is always 1 except for 0 or (-)infinity
In a programming language you'd never put a literary 0/0 in the code, it will mostly be some variable divided by some other variable (a/b); therefore whenever b = 0 there should be a division by zero error, regardless of the value of a.
but for example, in game programming you want the arctan of dy/dx to get the angle. There i would like to have the option to get 0 as outcome, it sucks to have to do a try catch or to check if the outcome isNaN only for the rare case that 2 objects have the same position. Then i would manually set the angle to 0 anyway
Overzicht
Verbanden
Selecties
Discussie (4)
Stats
Gerelateerd