tan()

Math / Trigonometry

Description

Calculates the ratio of the sine and cosine of an angle.

Syntax

float tan(float angle)

Parameters

NameTypeDescription
anglefloatangle in radians

Returns

float

Related

Under the Hood

From Processing.h:

static float tan(float x) { return std::tan(x); } static float tan(float x) { return std::tan(x);

Under the Hood

From Processing.cpp:

void PApplet::shearX(float a) {float m[]={1,0,0,0,std::tan(a),1,0,0,0,0,1,0,0,0,0,1}; void PApplet::shearY(float a) {float m[]={1,std::tan(a),0,0,0,1,0,0,0,0,1,0,0,0,0,1};