tri

Syntax

int tri (int a)

Arguments

a
Normally a value between 0 and 1024, but it can also be higher

Return

A value between -511 and 512 is returned.

Description

tri works like sin(), but returns a triangular/linear value. Has the same effect as tricos(a-256).

Example

Also see

(sin)?,tricos

Comments

Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.