更新 2022.3.9 15:59閲覧 499

【PHP】ラジアンと逆正弦と正弦

ラジアンは「円の半径に等しい長さの弧の中心に対する角度」。1 radは度数法では 180/π° で、およそ 57.29578° に相当する。
1の逆正弦は1.5707963267949ラジアン。 1の逆正弦の角度は90° 1.5707963267949ラジアンの正弦は1 1の正弦の角度は57.295779513082° 1ラジアンの正弦は0.8414709848079 0.8414709848079の正弦の角度は48.212736012209°
<blockquote class="bg-info text-info text-center px-3 pb-3"><strong>ラジアン</strong>は「円の半径に等しい長さの弧の中心に対する角度」。1 radは度数法では 180/π° で、およそ 57.29578° に相当する。</blockquote>
<?php
$arg = 1;
$asin = asin($arg);
$asin_deg = rad2deg($asin);
#$asin_deg = $asin / M_PI * 180;
$sin = sin($asin);
$sin_deg = rad2deg($sin);
#$sin_deg = $sin / M_PI * 180;
$rad = deg2rad($sin_deg);
$rad_sin = sin($rad);
$rad_sin_deg = rad2deg($rad_sin);
#$rad_sin_deg = $rad_sin / M_PI * 180;
echo
<<<EEL
<samp class="d-block bg-dark text-info px-5">
{$arg}の逆正弦は{$asin}ラジアン。
{$arg}の逆正弦の角度は{$asin_deg}°
{$asin}ラジアンの正弦は{$sin}
{$sin}の正弦の角度は{$sin_deg}°
{$rad}ラジアンの正弦は{$rad_sin}
{$rad_sin}の正弦の角度は{$rad_sin_deg}°

</samp>
<hr>
EEL;
highlight_file(__FILE__);
$stylesheet .= 'blockquote:before{content:"“";font-size:3rem}';