PHP Velho Oeste 2024

tan

(PHP 4, PHP 5, PHP 7)

tan탄젠트

설명

float tan ( float $arg )

tan()arg 인수의 탄젠트 값을 반환합니다. arg 인수는 라디안으로 주어집니다.

인수

arg

계산할 라디안 인수

반환값

arg의 탄젠트

예제

Example #1 tan() 예제

<?php

echo tan(M_PI_4); // 1

?>

참고

add a note add a note

User Contributed Notes 2 notes

up
-2
farba36 at yahoo dot com
9 years ago
Kotanjant için başka bir çözüm
<?php
$degrees
= 30;
echo
"$degrees derecelik açının kotanjant değeri: " . 1/tan(deg2rad($degrees));
?>
up
-9
georgedot at gmail dot com
14 years ago
Workaround for cotangent function

<?php
//FOR PHP 4
function cot($rad)
{
    return
tan(M_PI_2 - rad2deg($rad));
}

//FOR PHP 3
function cot($rad)
{
    return
tan(M_PI/2 - rad2deg($rad));
}
?>
To Top