Function reference · Math

tri

Returns a triangular pulse centered at 0.

It is 1-|x| for |x|<1, and 0 elsewhere. For a symbol, the call is returned unevaluated.

Notation

tri(x)

Write it in an expression: nerdamer('tri(0)'), or in the Playground.

nerdamer.tri

nerdamer.tri(x: ExpressionInput): Expression

A method on the default import. Arguments can be strings, as in Notation.

Examples

The peak.

tri(0)
// → 1
Open in Playground

Inside the pulse.

tri(1/4)
// → 3/4
Open in Playground

The edge is 0.

tri(1)
// → 0
Open in Playground

A symbol: unevaluated.

tri(x)
// → tri(x)
Open in Playground

← Back to Function reference