Mine
public text v1 · immutable#ifndef MATRIXZ_H
#define MATRIXZ_H
#include <vector>
class matrixZ
{
public:
std::vector<float> operator* (std::vector<float> Vect);
private:
float theta;
};
#endif
#include "matrixZ.h"
#include <vector>
#include <math.h>
std::vector<float> matrixZ::operator*(std::vector<float> Vect)
{
std::vector<float> temp(2);
temp[0] = Vect[0] * cos(theta) - Vect[1] * sin(theta);
temp[1] = Vect[0] * sin(theta) + Vect[1] * cos(theta);
return temp;
}