-
-
Notifications
You must be signed in to change notification settings - Fork 150
Description
I was looking to use the fit function from the math package. I looked at the documentation to understand how to use it.
The parameters of the function in the documentation are: a, b, c, d, e
And the documentation states that "Returns a number in the [c,d]
interval which is relative to x
in the [a,b]
interval". I found it a bit weird that it specified the x
parameter but all the others were valid so I thought the e
parameter must be x
.
I was getting really weird behavior in my code so I looked up the code of the function and x
is actually the first parameter :O
This must be because of the Fn5 type used under the hood.
Taking a closer look at the help in my editor, I can see the the first parameter is x
(@param x
) but it's still quite confusing and impossible to know from the documentation site: