LlVecDist/fr

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

Fonction: float llVecDist( vector vec_a, vector vec_b );

Renvoie un float correspondant la distance (non directionnelle et non négative) entre les vectors vec_a and vec_b (llVecMag(vec_a-vec_b)).

• vector vec_a N'importe quel vector valide
• vector vec_b N'importe quel vector valide

Exemples

<lsl> default {

   state_entry()
   {
       vector input_1 = <1.0,2.0,3.0>;
       vector input_2 = <3.0,2.0,1.0>;
       llOwnerSay("La distance entre " + (string) input_1 + " et " + (string) input_2 + " est : "+(string)llVecDist(input_1, input_2) );
   }

} </lsl>

Voir également

Fonctions

•  llVecMag Renvoie la magnitude d’un vector
•  llVecNorm Normalise un vector
Vous cherchez encore des informations ? Peut-être cette page du LSLwiki pourra vous renseigner.