Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class cPoint3{
- public:
- struct{
- float _x, _y, _z;
- };
- cPoint3( float x, float y, float z ){
- _x=x;_y=y;_z=z;
- }
- cPoint3(){
- //Default Constructor
- }
- inline cPoint3 cPoint3::operator+(cPoint3 Class){
- cPoint3 Cache(_x + Class._x, _y + Class._y, _z + Class._z);
- return Cache;
- }
- inline cPoint3 cPoint3::operator-(cPoint3 Class){
- cPoint3 Cache(_x - Class._x, _y - Class._y, _z - Class._z);
- return Cache;
- }
- inline cPoint3 cPoint3::operator/(cPoint3 Class){
- cPoint3 Cache(_x / Class._x, _y / Class._y, _z / Class._z);
- return Cache;
- }
- inline cPoint3 cPoint3::operator*(cPoint3 Class){
- cPoint3 Cache(_x * Class._x, _y * Class._y, _z * Class._z);
- return Cache;
- }
- inline cPoint3 cPoint3::operator=(cPoint3 Class){
- cPoint3 Cache(_x = Class._x, _y = Class._y, _z = Class._z);
- return Cache;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement