Commit b0926c38 by Francois Gygi

Added constructor from (double*) pointer.


git-svn-id: http://qboxcode.org/svn/qb/trunk@411 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 06946ab9
......@@ -21,9 +21,13 @@ class D3vector
double x, y, z;
// explicit constructor to avoid implicit conversion from double to D3vector
explicit D3vector(const double& xv = 0, const double& yv = 0, const double& zv = 0) :
explicit D3vector(const double& xv = 0,
const double& yv = 0,
const double& zv = 0) :
x(xv), y(yv), z(zv) {}
explicit D3vector(const double* r) : x(r[0]), y(r[1]), z(r[2]) {}
double& operator[](const int &i)
{
assert(i>=0 && i <3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment