close

Perl 函式 - atan2

 

■ 功  能

傳回Y / X的反正切值(arctan),範圍在-π到π

 

 

 

■ 語  法

atan2 Y,X

 

 

 

 

■ 傳  回   值

傳回Y / X的反正切值(arctan)

 

 

■ 範  例

程式碼

#!/usr/bin/perl

$X = 60;
$Y = 20;

$VALUE_1 = atan2 ($Y, $X );

print "ATAN2 of $Y/$X is : $VALUE_1\n"; 

 

結果

ATAN2 of 20/60 is : 0.321750554396642


#關鍵字 Perl 函式 - atan2用法;Perl 函式 - atan2語法;Perl 函式 - atan2範例;

 

 

■ Perl  其它函數

▶ Perl 函式|函數|指令集

 


arrow
arrow
    全站熱搜

    News123 發表在 痞客邦 留言(0) 人氣()