--

Nice concise summary!

I just wanted to point out, though, that using Math.round actually can give you the provided max number.

Adding 1 to the range when you use Math.round will actually go over the range.

The case where you can't get the max number should be when you use Math.floor.

--

--

Peter D Lee, CFA
Peter D Lee, CFA

Written by Peter D Lee, CFA

Investor | Trader | Software Engineer | CEO, LDH Group Inc. (ldhgroup.com)

Responses (1)