Skip to main content

Sin Cos Tan

Compute the mathematical operations of sine, cosine, or tangent and takes as input a value in degrees.

Sin Cos Tan block

Description

The Sin Cos Tan block computes the mathematical operations of sine, cosine, or tangent and takes as input a value in degrees. This is a code block part of the Math drawer.

Usage

Compute the mathematical operations of sine, cosine, or tangent and takes as input a value in degrees.

Syntax

Inputs in this block:

  • A number (in degrees)

Example

In this model, each agent moves on the z axis in accordance with the value of the sine function in relation to its x coordinate. In sequence, these agents create a sine wave.

Sin Cos Tan example code

Notes

The Sin Cos Tan block takes input in degrees, not radians. This is important to remember when calculating trigonometric values.