LogB - swapped parameters issue
LogB has incorrectly swapped parameter handling
There is a problem with LogB.
Log2(x) - works okay
Log10(x) - works okay
LogB(base, x) - works wrong!
This is because instead of Log2(x)/Log2(base) it is calculated in reverse as Log2(base)/Log2(x).
The test case is simple:
Uses "Console"
PrintL LogB(2, 8), Log2(8) ' -- Both should give 3, LogB doesn't give correct result
PrintL LogB(10, 100), Log10(100) ' -- Both should give 2, LogB doesn't give correct result
WaitKey
One of the solutions could be to change documentation :) But I think it would be good to keep the first param base and second the x, because only this way it will be consistent with Log2 and Log10 style.
Petr