Next: , Previous: Matrix routines, Up: Numerical algorithms



5.2.4 Points and vectors

Planar points and vectors can be stored in similar structures:

     struct geom_point {
       real x, y;
     };
     
     struct geom_vector {
       real dx, dy;
     };

It is safe to type-cast between these structures any time. Some simple manipulation routines and constants are defined in geomlib/vector.h. Any finite values of coordinates are supported in GEOMLIB but in some specific situations, extremely small or large values can lead to numerical problems.