Package org.geotools.mbstyle.expression
Class MBMath
- 
- All Implemented Interfaces:
- Expression,- Function
 
 public class MBMath extends MBExpression 
- 
- 
Field Summary- 
Fields inherited from class MBExpressioncolors, decisions, featureData, ff, heatMap, json, lookUp, math, name, parse, ramps, string, transformer, types, variableBindings, zoom
 - 
Fields inherited from class FunctionImplfunctionName
 - 
Fields inherited from interface ExpressionNIL
 
- 
 - 
Constructor SummaryConstructors Constructor Description MBMath(JSONArray json)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ExpressiongetExpression()Determines which expression to use.ExpressionmathAcos()Returns the arccosine of the input.ExpressionmathAdd()Returns the sum of the inputs.ExpressionmathAsin()Returns the arcsine of the input.ExpressionmathAtan()Returns the arctangent of the input.ExpressionmathCos()Returns the cosine of the input.ExpressionmathDivide()Returns the result of floating point division of the first input by the second.ExpressionmathE()Returns the mathematical constant e.ExpressionmathExponent()Returns the result of raising the first input to the power specified by the second.ExpressionmathLn()Returns the natural logarithm of the input.ExpressionmathLn2()Returns mathematical constant ln(2).ExpressionmathLog10()Returns the base-ten logarithm of the input.ExpressionmathLog2()Returns the base-two logarithm of the input.ExpressionmathMax()Returns the maximum value of the inputs.ExpressionmathMin()Returns the minimum value of the inputs.ExpressionmathMultiply()Returns the product of the inputs.ExpressionmathPi()Returns the mathematical constant pi.ExpressionmathRemainder()Returns the remainder after integer division of the first input by the second.ExpressionmathSin()Returns the sine of the input.ExpressionmathSqrt()Returns the square root of the input.ExpressionmathSubtract()For two inputs, returns the result of subtracting the second input from the first.ExpressionmathTan()Returns the tangent of the input.- 
Methods inherited from class MBExpressioncanCreate, create, getName, throwInsufficientArgumentCount, throwUnexpectedArgumentCount, transformExpression, transformLiteral
 - 
Methods inherited from class FunctionImplaccept, dispatchArguments, equals, evaluate, functionName, getFallbackValue, getFunctionName, getParameters, getParameterValue, getParameterValue, hashCode, setFallbackValue, setName, setParameters, toString
 - 
Methods inherited from class ExpressionAbstractevaluate
 - 
Methods inherited from interface Expressionevaluate
 
- 
 
- 
- 
- 
Method Detail- 
mathSubtractpublic Expression 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
 
 - 
mathMultiplypublic Expression mathMultiply() Returns the product of the inputs. Example: ["*", number, number, ...]: number- Returns:
- multiply expression
 
 - 
mathDividepublic Expression mathDivide() Returns the result of floating point division of the first input by the second. Example: ["/", number, number]: number- Returns:
- divide expression
 
 - 
mathRemainderpublic Expression mathRemainder() Returns the remainder after integer division of the first input by the second. Example: ["%", number, number]: number- Returns:
- remainder expression
 
 - 
mathExponentpublic Expression mathExponent() Returns the result of raising the first input to the power specified by the second. Example: ["^", number, number]: number- Returns:
- exponent expression
 
 - 
mathAddpublic Expression mathAdd() Returns the sum of the inputs. Example: ["+", number, number...]: number- Returns:
- add expression
 
 - 
mathAcospublic Expression mathAcos() Returns the arccosine of the input. Example: ["acos", number]: number- Returns:
- acos expression
 
 - 
mathAsinpublic Expression mathAsin() Returns the arcsine of the input. Example: ["asin", number]: number- Returns:
- asin expression
 
 - 
mathAtanpublic Expression mathAtan() Returns the arctangent of the input. Example: ["atan", number]: number- Returns:
- atan expression
 
 - 
mathCospublic Expression mathCos() Returns the cosine of the input. Example: ["cos", number]: number- Returns:
- cos expression
 
 - 
mathEpublic Expression mathE() Returns the mathematical constant e. Example: ["e"]: number- Returns:
- constant e literal
 
 - 
mathLnpublic Expression mathLn() Returns the natural logarithm of the input. Example: ["ln", number]: number- Returns:
- log expression
 
 - 
mathLn2public Expression mathLn2() Returns mathematical constant ln(2). Example: ["ln2"]: number- Returns:
- min(2) as a literal
 
 - 
mathLog10public Expression mathLog10() Returns the base-ten logarithm of the input. Example: ["log10", number]: number- Returns:
- log10 expression
 
 - 
mathLog2public Expression mathLog2() Returns the base-two logarithm of the input. Example: ["log2", number]: number- Returns:
- base to log expression
 
 - 
mathMaxpublic Expression mathMax() Returns the maximum value of the inputs. Example: ["max", number, number, ...]: number- Returns:
- max expression
 
 - 
mathMinpublic Expression mathMin() Returns the minimum value of the inputs. Example: ["min", number, number, ...]: number- Returns:
- min expression
 
 - 
mathPipublic Expression mathPi() Returns the mathematical constant pi. Example: ["pi"]: number- Returns:
- pi literal
 
 - 
mathSinpublic Expression mathSin() Returns the sine of the input. Example: ["sin", number]: number- Returns:
- sin expression
 
 - 
mathSqrtpublic Expression mathSqrt() Returns the square root of the input. Example: ["sqrt", number]: number- Returns:
- sqrt expression
 
 - 
mathTanpublic Expression mathTan() Returns the tangent of the input. Example: ["tan", number]: number- Returns:
- tan expression
 
 - 
getExpressionpublic Expression getExpression() throws MBFormatException Description copied from class:MBExpressionDetermines which expression to use.- Specified by:
- getExpressionin class- MBExpression
- Throws:
- MBFormatException
 
 
- 
 
-