2016-03-03 18:30:01 +00:00
|
|
|
#include "Multiplication.h"
|
|
|
|
|
|
|
|
/* [0] CONSTRUCTEUR
|
|
|
|
=========================================================*/
|
|
|
|
Multiplication::Multiplication(){
|
|
|
|
this->init(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* [1] Renvoie le nom du type de calcul
|
|
|
|
=========================================================*/
|
|
|
|
std::string Multiplication::getLibelle(){
|
2016-03-04 07:49:31 +00:00
|
|
|
return "a * b";
|
2016-03-03 18:30:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* [2] Effectue le calcul et renvoie le resultat
|
|
|
|
=========================================================*/
|
|
|
|
float* Multiplication::calc(){
|
|
|
|
this->result = (float*) malloc(1*sizeof(float));
|
|
|
|
|
|
|
|
this->result[0] = this->operands[0]*this->operands[1];
|
|
|
|
|
|
|
|
return this->result;
|
|
|
|
}
|