Scripting > Math Functions

Add a Constant

add(floating-point constant)

 

Add the value constant to all valid values in the current time series or paired data set.  For time series data, missing values are kept as missing. 

 

For paired data, constant is added to y-values only.  Use the setCurve method to first select the paired data curve(s).

 

See also:  add(HecMath dataSet)

setCurve()

Parameters: constant  - A floating-point value

Example: newDataSet = dataSet.add(2.5)

Returns: A new HecMath object of the same type as the current object