mvhooren/JitCat

log() calculates log10, not the natural logarithm

Zueuk opened this issue · 1 comments

Zueuk commented

I know sometimes people use "log" as log10 and "ln" as natural log, but here I expected it to be consistent with C++ math functions

While I agree with you that it would be better to mirror the C++ math functions, changing the log function to the natural logarithm now would silently break current uses of log.
Perhaps it's better to add log10 and ln and remove log so that there is less ambiguity. Users that upgrade their version of JitCat will then get a compile error in places where log is used instead of a silent change in behaviour. Even in C++ std::log is kind of ambiguous until you read the documentation.