Package org.geotools.mbstyle.expression
Class MBMath
- All Implemented Interfaces:
Expression
,Function
-
Field Summary
Fields inherited from class MBExpression
colors, decisions, featureData, ff, heatMap, json, lookUp, math, name, parse, ramps, string, transformer, types, variableBindings, zoom
Fields inherited from class FunctionImpl
functionName
Fields inherited from interface Expression
NIL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDetermines which expression to use.mathAcos()
Returns the arccosine of the input.mathAdd()
Returns the sum of the inputs.mathAsin()
Returns the arcsine of the input.mathAtan()
Returns the arctangent of the input.mathCos()
Returns the cosine of the input.Returns the result of floating point division of the first input by the second.mathE()
Returns the mathematical constant e.Returns the result of raising the first input to the power specified by the second.mathLn()
Returns the natural logarithm of the input.mathLn2()
Returns mathematical constant ln(2).Returns the base-ten logarithm of the input.mathLog2()
Returns the base-two logarithm of the input.mathMax()
Returns the maximum value of the inputs.mathMin()
Returns the minimum value of the inputs.Returns the product of the inputs.mathPi()
Returns the mathematical constant pi.Returns the remainder after integer division of the first input by the second.mathSin()
Returns the sine of the input.mathSqrt()
Returns the square root of the input.For two inputs, returns the result of subtracting the second input from the first.mathTan()
Returns the tangent of the input.Methods inherited from class MBExpression
canCreate, create, getName, throwInsufficientArgumentCount, throwUnexpectedArgumentCount, transformExpression, transformLiteral
Methods inherited from class FunctionImpl
accept, dispatchArguments, equals, evaluate, functionName, getFallbackValue, getFunctionName, getParameters, getParameterValue, getParameterValue, hashCode, setFallbackValue, setName, setParameters, toString
Methods inherited from class ExpressionAbstract
evaluate
Methods inherited from interface Expression
evaluate
-
Constructor Details
-
MBMath
public MBMath(JSONArray json)
-
-
Method Details
-
mathSubtract
For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0. Example: ["-", number, number]: number ["-", number]: number- Returns:
- subtract expression
-
mathMultiply
Returns the product of the inputs. Example: ["*", number, number, ...]: number- Returns:
- multiply expression
-
mathDivide
Returns the result of floating point division of the first input by the second. Example: ["/", number, number]: number- Returns:
- divide expression
-
mathRemainder
Returns the remainder after integer division of the first input by the second. Example: ["%", number, number]: number- Returns:
- remainder expression
-
mathExponent
Returns the result of raising the first input to the power specified by the second. Example: ["^", number, number]: number- Returns:
- exponent expression
-
mathAdd
Returns the sum of the inputs. Example: ["+", number, number...]: number- Returns:
- add expression
-
mathAcos
Returns the arccosine of the input. Example: ["acos", number]: number- Returns:
- acos expression
-
mathAsin
Returns the arcsine of the input. Example: ["asin", number]: number- Returns:
- asin expression
-
mathAtan
Returns the arctangent of the input. Example: ["atan", number]: number- Returns:
- atan expression
-
mathCos
Returns the cosine of the input. Example: ["cos", number]: number- Returns:
- cos expression
-
mathE
Returns the mathematical constant e. Example: ["e"]: number- Returns:
- constant e literal
-
mathLn
Returns the natural logarithm of the input. Example: ["ln", number]: number- Returns:
- log expression
-
mathLn2
Returns mathematical constant ln(2). Example: ["ln2"]: number- Returns:
- min(2) as a literal
-
mathLog10
Returns the base-ten logarithm of the input. Example: ["log10", number]: number- Returns:
- log10 expression
-
mathLog2
Returns the base-two logarithm of the input. Example: ["log2", number]: number- Returns:
- base to log expression
-
mathMax
Returns the maximum value of the inputs. Example: ["max", number, number, ...]: number- Returns:
- max expression
-
mathMin
Returns the minimum value of the inputs. Example: ["min", number, number, ...]: number- Returns:
- min expression
-
mathPi
Returns the mathematical constant pi. Example: ["pi"]: number- Returns:
- pi literal
-
mathSin
Returns the sine of the input. Example: ["sin", number]: number- Returns:
- sin expression
-
mathSqrt
Returns the square root of the input. Example: ["sqrt", number]: number- Returns:
- sqrt expression
-
mathTan
Returns the tangent of the input. Example: ["tan", number]: number- Returns:
- tan expression
-
getExpression
Description copied from class:MBExpression
Determines which expression to use.- Specified by:
getExpression
in classMBExpression
- Throws:
MBFormatException
-