Back to functions

tri


triangular function

The triangular function as defined here

Usage: nerdamer("tri(x)")


Parameters

expression x Returns the appropriate value if possible otherwise it returns the function with the simplified expression

Returns

Expression

EXAMPLES:
var x = nerdamer('tri(5/2)').evaluate();
console.log(x.toString());
var x = nerdamer('tri(-2)').evaluate();
console.log(x.toString());
var x = nerdamer('tri(0)').evaluate();
console.log(x.toString());
OUTPUT:
Back to functions