Package org.geotools.mbstyle.expression
Class MBMath
- All Implemented Interfaces:
- Expression,- Function
- 
Field SummaryFields inherited from class MBExpressioncolors, decisions, featureData, ff, heatMap, json, lookUp, math, name, parse, ramps, string, transformer, types, variableBindings, zoomFields inherited from class FunctionImplfunctionNameFields inherited from interface ExpressionNIL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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 MBExpressioncanCreate, create, getName, throwInsufficientArgumentCount, throwUnexpectedArgumentCount, transformExpression, transformLiteralMethods inherited from class FunctionImplaccept, dispatchArguments, equals, evaluate, functionName, getFallbackValue, getFunctionName, getParameters, getParameterValue, getParameterValue, hashCode, setFallbackValue, setName, setParameters, toStringMethods inherited from class ExpressionAbstractevaluateMethods inherited from interface Expressionevaluate
- 
Constructor Details- 
MBMathpublic MBMath(JSONArray json) 
 
- 
- 
Method Details- 
mathSubtractFor 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
 
- 
mathMultiplyReturns the product of the inputs. Example: ["*", number, number, ...]: number- Returns:
- multiply expression
 
- 
mathDivideReturns the result of floating point division of the first input by the second. Example: ["/", number, number]: number- Returns:
- divide expression
 
- 
mathRemainderReturns the remainder after integer division of the first input by the second. Example: ["%", number, number]: number- Returns:
- remainder expression
 
- 
mathExponentReturns the result of raising the first input to the power specified by the second. Example: ["^", number, number]: number- Returns:
- exponent expression
 
- 
mathAddReturns the sum of the inputs. Example: ["+", number, number...]: number- Returns:
- add expression
 
- 
mathAcosReturns the arccosine of the input. Example: ["acos", number]: number- Returns:
- acos expression
 
- 
mathAsinReturns the arcsine of the input. Example: ["asin", number]: number- Returns:
- asin expression
 
- 
mathAtanReturns the arctangent of the input. Example: ["atan", number]: number- Returns:
- atan expression
 
- 
mathCosReturns the cosine of the input. Example: ["cos", number]: number- Returns:
- cos expression
 
- 
mathEReturns the mathematical constant e. Example: ["e"]: number- Returns:
- constant e literal
 
- 
mathLnReturns the natural logarithm of the input. Example: ["ln", number]: number- Returns:
- log expression
 
- 
mathLn2Returns mathematical constant ln(2). Example: ["ln2"]: number- Returns:
- min(2) as a literal
 
- 
mathLog10Returns the base-ten logarithm of the input. Example: ["log10", number]: number- Returns:
- log10 expression
 
- 
mathLog2Returns the base-two logarithm of the input. Example: ["log2", number]: number- Returns:
- base to log expression
 
- 
mathMaxReturns the maximum value of the inputs. Example: ["max", number, number, ...]: number- Returns:
- max expression
 
- 
mathMinReturns the minimum value of the inputs. Example: ["min", number, number, ...]: number- Returns:
- min expression
 
- 
mathPiReturns the mathematical constant pi. Example: ["pi"]: number- Returns:
- pi literal
 
- 
mathSinReturns the sine of the input. Example: ["sin", number]: number- Returns:
- sin expression
 
- 
mathSqrtReturns the square root of the input. Example: ["sqrt", number]: number- Returns:
- sqrt expression
 
- 
mathTanReturns the tangent of the input. Example: ["tan", number]: number- Returns:
- tan expression
 
- 
getExpressionDescription copied from class:MBExpressionDetermines which expression to use.- Specified by:
- getExpressionin class- MBExpression
- Throws:
- MBFormatException
 
 
-