acos

(PHP 4, PHP 5)

acosCosseno Inverso (arco cosseno)

Descrição

float acos ( float $arg )

Retorna o inverso do cosseno de arg em radianos. acos() é a função complementar de cos(), o que significa que a==cos(acos(a)) para qualquer valor de var que esteja dentro dos limites de acos().

Parâmetros

arg

O argumento para processar

Valor Retornado

O arco cosseno do arg em radianos.

Veja Também

  • cos() - Coseno
  • acosh() - Cosseno Hiperbólico Inverso
  • asin() - Seno Inverso (arco seno)
  • atan() - Tangente Inversa (arco tangente)

add a note add a note

User Contributed Notes 1 note

up
0
zoltan dot szentesi at nokia dot com
8 years ago
Wondering what is the use of 'acos' function?

It is essential in games, animations and drawings to determine the location of two objects relating to each other.

To the point: the angle of two vectors is calculated by

           v1X*v2X + v1Y*v2Y
  acos(--------------------------)=angle between two vectors.
               |v1| * |v2|

|v1| and |v2| are the length of the vectors and calculated using Pithagoras-formula: |v1|=sqrt(v1X*v1X + v1Y*v1Y)

This helped me to calculate and share given space for 'n' amount of objects so that they don't overlap.

Enjoy! :-)
To Top