IT rekvalifikácia. Seniorní programátori zarábajú až 6 000 €/mesiac a rekvalifikácia je prvým krokom. Zisti, ako na to!

PHP - asin

Trieda

Koreň \ Bez triedy

Metóda - asin

(PHP 4, PHP 5, PHP 7)

The asin() function returns a value of the goniometric function arc sine. The arc sine is the complementary function of sine (often referred as sin−1). It's used to get back the angle, which means, that a == sin(asin(a)).

Procedurálne

  • function asin (float $arg) : float

Parametre

NázovDátový typPredvolená hodnotaPopis
$argfloat

The value of sine.

Mávratovej hodnoty

Vracia: float

The resulting angle in radians.

Príklady

<?php
// each 15° till 180
for ($i = 0; $i <= 180; $i += 15) {
    $sin = sin(deg2rad($i)); // converts the angle into radians and calculates its sine
    $deg = rad2deg(asin($sin)); // calculates the angle in radians using the previous value and then converts it into degrees
    echo("sin({$i}°) = $sin ---> asin($sin) = {$deg}°<br />");
}

Súvisiace manuály

      • function acos (float $arg) : float
      • function asinh (float $arg) : float
      • function atan (float $arg) : float
      • function sin (float $arg) : float
      Aktivity