Last active
October 25, 2017 16:19
-
-
Save prince-chrismc/75d869073fb12ce6a7e1b3e1337ead23 to your computer and use it in GitHub Desktop.
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
/* | |
This code is untest but provided as an example | |
*/ | |
#include "stackoverflow.com-questions-46921632.h" | |
void function() | |
{ | |
vector3D a(); | |
vector3D b(3.0f); | |
vector3D c(3.0f, 4.0f, 5.0f); | |
} | |
int main() { | |
function(); | |
return 0; | |
} |
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
/* | |
This code is untest but provided as an example | |
*/ | |
class vector3D | |
{ | |
private: | |
float x, y, z; | |
public: | |
vector3D() : x(0.0f), y(0.0f), z(0.0f) { }; | |
vector3D(const float& c) : x(c), y(c), z(c) { }; | |
vector3D(const float& cx, const float& cy, const float& cz) : x(cx), y(yc), z(cz) { }; | |
vector3D(const vector3D& v) : x(v.x), y(v.y), z(v.z) { }; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment