pt:tan [BASIC 256 - Language Documentation]

# BASIC 256 - Language Documentation

pt:tan

## Tan

### Formato

tan ( expression )

### Descrição

Calcula a tangente de expression. Expression é calculada em radianos..

### Ver também

Acos, Asin, Atan, Sin, Cos, Degrees, Radians

### Exemplo

    clg
    color black
    # draw a line across the graphic output
    line 0,150,300,150
    # where do we start
    lastx = 0
    lasty = tan(0) * 50 + 150
    # now step across the line and draw
    for x = 0 to 300 step 5
       angle = x / 300 * 2 * pi
       y = tan(angle) * 50 + 150
       line lastx, lasty, x, y
       lastx = x
       lasty = y
    next x

Desenha

pt/tan.txt · Last modified: 2012/12/18 08:04 by m_santos