linearly v0.32.0Docs


linearly v0.32.0 / scalar / triangle

Function: triangle()

triangle(x, period): number

Returns a triangle wave with the given period. The output ranges from 0 to 1.

Parameters

x: number

The input value

period: number = 1

The period of the wave

Returns

number

See

https://www.geogebra.org/calculator/d3grfqqeopen in new window

Defined in

src/scalar.ts:484open in new window