Expression functions in 0.2.0

Some input fields in Junctioneer take Expressions. These expressions can contain calls to built-in functions. This document shows all built-in functions available for expressions in Junctioneer 0.2.0. For help on how to use expressions, see Expression documentation.

Note that the parentheses are mandatory even for functions that do not take any arguments.

Index

Random numbers:
IntUnif, DoubleUnif, DoublePoisson, DoubleExponential
Math:
PI, Ln
Utility functions:
Min, Max, Abs, Clamp, Round, DecimalsOnly, Floor
Simulation state:
T

Random numbers

IntUnif(start, end)Draw a value from a random uniform distribution of integer values from start to end. [start, end[
DoubleUnif(start, end)Draw a random value from a random uniform distribution of floating point values from start to end. [start, end[
DoublePoisson(mu)Draw a random value from a poison distribution.
DoubleExponential(mu)Draw a random value from a exponential distribution.

Math

PI()Returns the value of PI. 3.141592...
Ln(x)Ln(x). x must be > 0

Utility functions

Min(x1, x2)returns the smallest value of x1 and x2
Max(x1, x2)returns the largest value of x1 and x2
Abs(x)absolute value of x
Clamp(value, min, max)clamp value to range [min, max]
Round(x)ronud x to closest integer value
DecimalsOnly(x)returns only the decimals of a floating point value
Floor(x)ronud x down to integer value. Eg. 5.7 => 5

Simulation state

T()returns amount of time since the simulation started in seconds (with decimals).