Closed Jan-Ka closed 7 years ago
Hey @Jan-Ka , I was finally able to review #39. You are right, NaN
is a bad default. -1
is a good default value, you can use that. (We needn't use null because all these are times which can never be less than 0. Also, if something goes wrong and the default value is printed, -1
will be better to read than null
)
While working on #30 I found that by default the result of
solvestats-module.calcStats
will returnNaN
is not a good value to compare against, I propose to change the default value tonull
. To quote one of my unit-tests (b0194129b7e4f25905880f37a8c7b68ee6968402) whyNaN
is suboptimal:Edit: Sorry, hit NumPad Enter while reaching for the Mouse :(