Updated Double3.h and Double3.cpp

Added a constructor with Vector3 input and cleaned up some documentation. Also fixed a parameter name and some weird extra whitespace.
This commit is contained in:
intolerantape
2021-09-29 20:40:37 -07:00
parent 6150aaaa77
commit 06a4c30cc0
2 changed files with 27 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
#include "Double2.h"
#include "Double3.h"
@@ -45,6 +45,20 @@ Double3::Double3(const Vector2& xy)
{
}
Double3::Double3(const Vector3& xyz)
: X(xyz.X)
, Y(xyz.Y)
, Z(xyz.Z)
{
}
Double3::Double3(const Vector4& xyzw)
: X(xyzw.X)
, Y(xyzw.Y)
, Z(xyzw.Z)
{
}
Double3::Double3(const Int2& xy, double z)
: X(static_cast<double>(xy.X))
, Y(static_cast<double>(xy.Y))
@@ -66,13 +80,6 @@ Double3::Double3(const Int4& xyzw)
{
}
Double3::Double3(const Vector4& xyzw)
: X(xyzw.X)
, Y(xyzw.Y)
, Z(xyzw.Z)
{
}
Double3::Double3(const Double2& xy)
: X(xy.X)
, Y(xy.Y)

View File

@@ -143,11 +143,19 @@ public:
// Init
// @param xy Vector2 value
explicit Double3(const Vector2& xy);
// Init
// @param xyz Vector3 value
explicit Double3(const Vector3& xyz);
// Init
// @param xy Int22 with X and Y components values
// @param xyz Vector4 value
explicit Double3(const Vector4& xyzw);
// Init
// @param xy Int2 with X and Y components values
// @param z Z component value
explicit Double3(const Int2& xy, double z);
explicit Double3(const Int2& xy, double z);
// Init
// @param xyz Int3 value
@@ -155,22 +163,17 @@ public:
// Init
// @param xyzw Int4 value
explicit Double3(const Int4& xyzw);
// Init
// @param xyz Vector4 value
explicit Double3(const Vector4& xyzw);
explicit Double3(const Int4& xyzw);
// Init
// @param xy Double2 value
Double3(const Double2& xy);
explicit Double3(const Double2& xy);
// Init
// @param xy Double2 value
// @param z Z component value
explicit Double3(const Double2& xy, double z);
// Init
// @param xyzw Double4 value
explicit Double3(const Double4& xyzw);