PoDoFo 1.2.0
Loading...
Searching...
No Matches
Vector2.h
1// SPDX-FileCopyrightText: 2021 Francesco Pretto <ceztko@gmail.com>
2// SPDX-License-Identifier: LGPL-2.0-or-later OR MPL-2.0
3
4#ifndef AUX_VECTOR2_H
5#define AUX_VECTOR2_H
6
7#include "basedefs.h"
8
9namespace PoDoFo
10{
11 class Matrix;
12
13 class PODOFO_API Vector2 final
14 {
15 public:
16 Vector2();
17 Vector2(double x, double y);
18
19 public:
20 double GetLength() const;
21 double GetSquaredLength() const;
22
23 Vector2 operator+(const Vector2& v) const;
24 Vector2 operator-(const Vector2& v) const;
25 Vector2 operator*(const Matrix& m) const;
26
27 Vector2& operator+=(const Vector2& v);
28 Vector2& operator-=(const Vector2& v);
29
30 double Dot(const Vector2& v) const;
31
32 bool operator==(const Vector2& v) const;
33 bool operator!=(const Vector2& v) const;
34
35 public:
36 Vector2(const Vector2&) = default;
37 Vector2& operator=(const Vector2&) = default;
38
39 public:
40 double X;
41 double Y;
42 };
43}
44
45#endif // AUX_VECTOR2_H
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13