Recherche sur les Noms des fonctions php/mysql
sin()
Définition
Sinus - (PHP 4, PHP 5)Description
float sin
( float $arg
)
sin() retourne le sinus de arg (arg in radians).
Liste de paramètres
- arg
-
Une valeur, en radians
Valeurs de retour
Le sinus de arg .
Exemples
Exemple #1 Exemple avec sin()
<?php
// La précision dépend de la directive precision
echo sin(deg2rad(60)); // 0.866025403 ...
echo sin(60); // -0.304810621 ...
?>
Bouts de code utilisant la fonction sin()
<?php /* ... */
global $phase1, $phase2;
return 96 * (1 + sin($x/M_PI/32 + $phase1)) * (1 + sin($y/M_PI/17 -
$phase_y));
/* ... */ ?>
<?php /* ... */
$dla = ($rla2 - $rla1) / 2;
$a = (sin($dla) * sin($dla)) + cos($rla1) * cos($rla2) * (sin($dlo) * sin($dlo
));
/* ... */ ?>
<?php /* ... */
//Longitude vraie
$S =$L + 2 * $e * Sin($M) + 1.25 * $e * $e * Sin(2 * $M);
//Coordonnées rectangulaires du soleil dans le repère équatorial
/* ... */ ?>
<?php
echo sin(deg2rad(60)); // 0.866025403 ...
echo sin(60); // -0.304810621 ...
/* ... */ ?>
Connexion
Les fonctions
Références
- abs
- acos
- acosh
- asin
- asinh
- atan2
- atan
- atanh
- base_convert
- bindec
- ceil
- cos
- cosh
- decbin
- dechex
- decoct
- deg2rad
- exp
- expm1
- floor
- fmod
- getrandmax
- hexdec
- hypot
- is_finite
- is_infinite
- is_nan
- lcg_value
- log10
- log1p
- log
- max
- min
- mt_getrandmax
- mt_rand
- mt_srand
- octdec
- pi
- pow
- rad2deg
- rand
- round
- sin
- sinh
- sqrt
- srand
- tan
- tanh





