MathFunction.HyperbolicTangent Class
Hyperbolic tangent.
Constructor
Item Index
Methods
_printArg
-
index
Print an argument, with parentheses if necessary.
Parameters:
-
indexNumber | MathFunctionargument index or MathFunction
Returns:
the string representation of the argument
evaluate
-
var_list
Parameters:
-
var_listObjectmap of variable names to values or MathFunctions
Returns:
the value of the function
evaluateArgs
-
var_list
Parameters:
-
var_listObjectmap of variable names to values or MathFunctions
Returns:
list of argument values, from calling evaluate()
getArgCount
()
Int
Returns:
number of arguments
getArgs
()
Array
Returns:
array of arguments
getMaxArgCount
()
Int
By default, we assume the number of arguments is fixed. Derived classes can override.
Returns:
maximum number of arguments
handleKeyPress
-
canvas -
code -
c
Parameters:
-
canvasMathCanvas -
codeIntcharacter code -
cStringcharacter
Returns:
layout
-
context -
top_left -
font_size -
rect_list
Parameters:
-
contextObjectthe drawing context
-
top_leftPointx,y coordinates of the top left of the bounding box
-
font_sizeFloatpercentage of the base font size
-
rect_listRectListlayout information
Returns:
index of this items info in rect_list
parenthesizeForPrint
-
f
Parameters:
Returns:
parenthesizeForRender
-
f
Parameters:
Returns:
render
-
context -
rect_list
Parameters:
-
contextObjectthe drawing context
-
rect_listRectListlayout information
replaceArg
-
origArg -
newArg
If origArg is an argument, replaces origArg with newArg.
Parameters:
-
origArgMathFunctionoriginal argument
-
newArgMathFunctionnew argument
toString
()
Returns:
text representation of the function
