Way to access "jmap"?

I am trying to use function jmap from juce_core/maths. Though, when I trying jmap blindly in my code, I get “no matching function for call to “jmap”” error.

From some digging, I found just including the main Juce header includes the core header, which in turn includes juce_MathsFunctions.h, which jmap resides under. I can assume the header is included properly in my code, because if I force inclusion of specifically juce_MathsFunctions.h, I get a spew of “redefinition” errors (especially because juce_MathsFunctions.h is not protected with #pragma once).

I also noticed those functions were under namespace juce, so I tried calling jmap with juce::jmap with no avail.

Are you supposed to be able to access function jmap in a specific way, hence my struggles?

This probably means you’re mixing the types of arguments you’re passing. jmap requires that all of its arguments have exactly the same type. The rest of the compiler error message should tell you which types it deduced for the arguments.

Thank you so much for your quick reply! You are right, that fixed it!

Xcode and JIT were both giving me the same, vague error of “no matching function for call to “jmap”” with no context (as in what variable types to use), but now I’m realizing now the context is “matching,” i.e. no matching function overload. Gotcha.

Thanks again!