Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oiling my tablet
Message
De
29/04/2013 11:36:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
29/04/2013 09:17:06
Information générale
Forum:
Javascript
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01572116
Message ID:
01572170
Vues:
47
>The problem with the first approach was 180 degrees. That was the source of the wrong results
>
>I was looking into sin and cos
>
>ps: Add a test for c == 0 ( ie 90 or 270 degrees)
>
>pps: How are you going to make the distinction between quadrants I and III ( same for II and IV)

You can always turn to arc cotangent when you cross over 45 degrees, i.e. when the y axis segment is larger than the x axis segment.

As for the quadrants, there's always checking the sign of the segments, i.e. which is positive which is negative. Going by segments, x and y are ++, -+. --, +-.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform