MCPcopy Create free account
hub / github.com/Kitware/VTK / GetMathFunctionStringLength

Method GetMathFunctionStringLength

Common/Misc/vtkFunctionParser.cxx:1618–1654  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1616
1617//------------------------------------------------------------------------------
1618int vtkFunctionParser::GetMathFunctionStringLength(int mathFunctionNumber)
1619{
1620 switch (mathFunctionNumber)
1621 {
1622 case VTK_PARSER_LOGARITHME:
1623 case VTK_PARSER_IF:
1624 return 2;
1625 case VTK_PARSER_ABSOLUTE_VALUE:
1626 case VTK_PARSER_EXPONENT:
1627 case VTK_PARSER_LOGARITHM:
1628 case VTK_PARSER_SINE:
1629 case VTK_PARSER_COSINE:
1630 case VTK_PARSER_TANGENT:
1631 case VTK_PARSER_MAGNITUDE:
1632 case VTK_PARSER_MIN:
1633 case VTK_PARSER_MAX:
1634 return 3;
1635 case VTK_PARSER_CEILING:
1636 case VTK_PARSER_SQUARE_ROOT:
1637 case VTK_PARSER_ARCSINE:
1638 case VTK_PARSER_ARCCOSINE:
1639 case VTK_PARSER_ARCTANGENT:
1640 case VTK_PARSER_HYPERBOLIC_SINE:
1641 case VTK_PARSER_HYPERBOLIC_COSINE:
1642 case VTK_PARSER_HYPERBOLIC_TANGENT:
1643 case VTK_PARSER_NORMALIZE:
1644 case VTK_PARSER_SIGN:
1645 return 4;
1646 case VTK_PARSER_FLOOR:
1647 case VTK_PARSER_LOGARITHM10:
1648 case VTK_PARSER_CROSS:
1649 return 5;
1650 default:
1651 vtkWarningMacro("Unknown math function");
1652 return 0;
1653 }
1654}
1655
1656//------------------------------------------------------------------------------
1657int vtkFunctionParser::GetMathConstantNumber(int currentIndex)

Callers 2

CheckExpressionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected