/* Stockage de composantes rvba             */
/*                                          */
/* Auteur: Nicolas JANEY                    */
/* nicolas.janey@univ-fcomte.fr             */
/* Novembre 2012                            */

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

#include "Rvba.h"
#include "Rvb.h"

/* Constructeurs                            */
Rvba::Rvba(void):Rvb() {
  a = 1.0;
}

Rvba::Rvba(double r,double v,double b,double a):Rvb(r,v,b) {
  this->a = a;
}

Rvba::Rvba(float r,float v,float b,float a):Rvb(r,v,b) {
  this->a = a;
}

Rvba::Rvba(double *c):Rvb(c) {
  this->a = c[3];
}

Rvba::Rvba(float *c):Rvb(c) {
  this->a = c[3];
}

Rvba::Rvba(Rvba *c) {
  r = c->r;
  v = c->v;
  b = c->b;
  a = c->a;
}

/* Destructeur                              */
Rvba::~Rvba(void) {
}

/* Methode d'affichage texte                */
void Rvba::print(void) {
  printf("%8.3lf %8.3lf %8.3lf %8.3lf",r,v,b,a);
}
