You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
The text was updated successfully, but these errors were encountered:
This is really an (unresolved) issue with arrow functions, predeclared function types and how they're handled by TypeDoc and/or the TypeScript language server in general (tl;dr like 3rd class citizens). Also see #385 and #362 for related aspects... The only way around this seems to be a) replacing all arrow function with "normal" functions or b) removing the usage of function types and adding type info to each arg. Both are non-desirable/non-beneficial changes. My recommendation is to file some related issues with either TypeDoc and/or TypeScript... I personally don't have the bandwidth to deal with this, but would be grateful to anyone who does...
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 tox
in the[a,b]
interval". I found it a bit weird that it specified thex
parameter but all the others were valid so I thought thee
parameter must bex
.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 :OThis 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:The text was updated successfully, but these errors were encountered: