Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Viktor-Kolaric-ID.8311933-217CR-Resit-Assignment/CRVec3.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
41 lines (34 sloc)
896 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
namespace CR217 { | |
class CRVec3 | |
{ | |
private: | |
public: | |
//dimensions | |
float x; | |
float y; | |
float z; | |
//CRVec3 constructor | |
CRVec3(); | |
CRVec3(float CRX, float CRY, float CRZ); | |
//CRVec3 destructor | |
~CRVec3(); | |
//CRVec3 Constructor copy | |
CRVec3(const CRVec3& v); | |
CRVec3& operator=(const CRVec3& v); | |
CRVec3 operator+(const CRVec3& v)const; | |
void operator+=(const CRVec3& v); | |
CRVec3 operator-(const CRVec3& v)const; | |
void operator-=(const CRVec3& v); | |
CRVec3 operator*(const float s)const; | |
void operator*=(const float s); | |
CRVec3 operator/(const float s)const; | |
void operator/=(const float s); | |
float operator*(const CRVec3& v) const; | |
float dot(const CRVec3& v) const; | |
CRVec3 cross(const CRVec3& v) const; | |
void operator%=(const CRVec3& v); | |
CRVec3 operator%(const CRVec3& v) const; | |
float magnitude(); | |
}; | |
} | |