Logo Search packages:      
Sourcecode: wims version File versions

void geo::pt::Rotation ( pt  A,
pt  O,
double  a 
) [inline]

Donne l'image du point A par la rotation de centre O et d'angle a.

Definition at line 100 of file pt.java.

References geo::ObjetRepere::defini, majXY(), x, and y.

Referenced by geo::point::Rotation1(), and geo::ArcDeCercle::trace().

   { defini = A.defini && O.defini ;
     if (defini) { double OAx = A.x - O.x ;
                   double OAy = A.y - O.y ;
                   double cosa = Math.cos (a) ;
                   double sina = Math.sin (a) ;
                   x = O.x + cosa * OAx - sina * OAy ;
                   y = O.y + sina * OAx + cosa * OAy ;
                   majXY () ;
                 }
   }


Generated by  Doxygen 1.6.0   Back to index