Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (28 sloc) 621 Bytes
#ifndef STATE_H
#define STATE_H
#include "Vector.h"
#include <iostream>
using namespace std;
class State
State() {};
State& operator=(const State &rhs) {
// Check for self-assignment!
if (this == &rhs) // Same object?
return *this; // Yes, so skip assignment, and just return *this.
this->position = rhs.position;
this->velocity = rhs.velocity;
return *this;
void debug( const char* val)
cerr << val << "n" << endl;
position.debug("position \n");
velocity.debug("velocity \n");
cerr << endl;
Vector position;
Vector velocity;
Something went wrong with that request. Please try again.