Skip to main content

vJSONMath

Apply mathematical operations to an array Tip: If you want to apply math operations to arrays of XY or XYZ value pairs, the vJSONUnPacker node will extract all the values into a single linear sequence of numbers. You can then use the vJSONMath node to modify the values. Then a vJSONPacker node can remux the linear sequence of numbers back into XY or XYZ value pairs. The following math operations are supported: - Subtract A-B - Multiply - Divide A/B - Min - Max - Average - Difference - Modulo A/B - Power A^B - Arc Tangent A/B - Sine - Cosine - Tangent - Arc Sine - Arc Cosine - Arc Tangent - Log - Log 10 - Exponential - Degrees to Radians - Radians to Degrees - Absolute Value - Ceiling - Floor - Square Root - Reciprocal - Negate - Random - Randomseed

Mograph / JSONJSONScriptValArray
vJSONMath node

Parameters​

ParameterTypeDefaultDescription
WhichInteger——
OperationInteger0.0—
Input NumberIntegerUse Number—
NumberFloat1—
line4SeparatorFloat——
+4 more parameters
ParameterTypeDefaultDescription
Show InputInteger0.0—
ConnectedInteger0.0—
Array ADATATYPE——
Array BDATATYPE——

Example Connections​

vJSONGenerateSpirals.Output -> vJSONUnPacker.ArrayB
vJSONUnPacker.OutputArray -> vJSONMath.ArrayA
vJSONMath.Output -> vJSONPacker.ArrayA
vJSONPacker.Output -> vJSONViewer.Text