#include <stdio.h>
#include <math.h>

#include "geometrie-2d.h"

int main()
{
  double p[2] = { 2.0, 3.0 };
  double tr[2][3];

  printf("Coordonnées initiales    : (%lf, %lf)\n", p[0], p[1]);

  geo2d_creer_echelle(0.5, tr);
  geo2d_appliquer(tr, p);
  printf("Après la mise à l'échelle: (%lf, %lf)\n", p[0], p[1]);

  geo2d_creer_rotation(-M_PI / 2.0, tr);
  geo2d_appliquer(tr, p);
  printf("Après la rotation        : (%lf, %lf)\n", p[0], p[1]);

  geo2d_creer_translation(-1.0, 2.0, tr);
  geo2d_appliquer(tr, p);
  printf("Après la translation     : (%lf, %lf)\n", p[0], p[1]);

  return 0;
}
