Merge pull request #2219 from assimp/kimkulling-issue_2212

Update vector2.h
pull/2244/head^2
Kim Kulling 2018-12-01 13:41:37 +01:00 committed by GitHub
commit 7e06c401f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 10 deletions

View File

@ -53,7 +53,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# include <math.h> # include <math.h>
#endif #endif
#include "./Compiler/pushpack1.h"
#include "defs.h" #include "defs.h"
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
@ -62,24 +61,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef __cplusplus #ifdef __cplusplus
template <typename TReal> template <typename TReal>
class aiVector2t class aiVector2t {
{
public: public:
aiVector2t () : x(), y() {} aiVector2t () : x(), y() {}
aiVector2t (TReal _x, TReal _y) : x(_x), y(_y) {} aiVector2t (TReal _x, TReal _y) : x(_x), y(_y) {}
explicit aiVector2t (TReal _xyz) : x(_xyz), y(_xyz) {} explicit aiVector2t (TReal _xyz) : x(_xyz), y(_xyz) {}
aiVector2t (const aiVector2t& o) = default; aiVector2t (const aiVector2t& o) = default;
public:
void Set( TReal pX, TReal pY); void Set( TReal pX, TReal pY);
TReal SquareLength() const ; TReal SquareLength() const ;
TReal Length() const ; TReal Length() const ;
aiVector2t& Normalize(); aiVector2t& Normalize();
public:
const aiVector2t& operator += (const aiVector2t& o); const aiVector2t& operator += (const aiVector2t& o);
const aiVector2t& operator -= (const aiVector2t& o); const aiVector2t& operator -= (const aiVector2t& o);
const aiVector2t& operator *= (TReal f); const aiVector2t& operator *= (TReal f);
@ -111,6 +104,4 @@ struct aiVector2D {
#endif // __cplusplus #endif // __cplusplus
#include "./Compiler/poppack1.h"
#endif // AI_VECTOR2D_H_INC #endif // AI_VECTOR2D_H_INC