You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

41 lines
794 B

#ifndef __FRAME_H__
#define __FRAME_H__
struct frame {
float left;
float right;
inline frame operator+(const frame& rhs) {
return {
.left = left + rhs.left,
.right = right + rhs.right
};
}
inline frame operator+=(const frame& rhs) {
this->left += rhs.left;
this->right += rhs.right;
return *this;
}
inline frame operator*(float rhs) {
return {
.left = left * rhs,
.right = right * rhs
};
}
inline frame operator+=(float rhs) {
this->left += rhs;
this->right += rhs;
return *this;
}
inline frame operator*=(float rhs) {
this->left *= rhs;
this->right *= rhs;
return *this;
}
};
#endif