Public Member Functions | Private Attributes | Friends | List of all members
Vector2 Class Reference

Public Member Functions

bool operator!= (const Vector2 &v) const
 
Vector2 operator* (float value) const
 
Vector2 operator* (const Vector2 &v) const
 
Vector2operator*= (float v)
 
Vector2operator*= (const Vector2 &v)
 
Vector2 operator+ (const Vector2 &v) const
 
Vector2 operator+ (float value) const
 
Vector2operator+= (const Vector2 &v)
 
Vector2 operator- () const
 
Vector2 operator- (const Vector2 &v) const
 
Vector2 operator- (float value) const
 
Vector2operator-= (const Vector2 &v)
 
Vector2 operator/ (float value) const
 
Vector2 operator/ (const Vector2 &v) const
 
Vector2operator/= (float v)
 
Vector2operator/= (const Vector2 &v)
 
Vector2operator= (const Vector2 &v)
 
Vector2operator= (Vector2 &&v) noexcept
 
bool operator== (const Vector2 &v) const
 
std::string toString () const
 
 Vector2 (float x, float y)
 
 Vector2 (const Vector2 &v)
 
 Vector2 (Vector2 &&v) noexcept
 
 ~Vector2 ()
 

Private Attributes

float x
 
float y
 

Friends

Vector2 operator* (float f, const Vector2 &v)
 
Vector2 operator+ (float f, const Vector2 &v)
 
Vector2 operator- (float f, const Vector2 &v)
 
Vector2 operator/ (float f, const Vector2 &v)
 

Detailed Description

Definition at line 18 of file test_operator_overloading.cpp.

Constructor & Destructor Documentation

◆ Vector2() [1/3]

Vector2::Vector2 ( float  x,
float  y 
)
inline

Definition at line 20 of file test_operator_overloading.cpp.

◆ Vector2() [2/3]

Vector2::Vector2 ( const Vector2 v)
inline

Definition at line 21 of file test_operator_overloading.cpp.

◆ Vector2() [3/3]

Vector2::Vector2 ( Vector2 &&  v)
inlinenoexcept

Definition at line 22 of file test_operator_overloading.cpp.

◆ ~Vector2()

Vector2::~Vector2 ( )
inline

Definition at line 39 of file test_operator_overloading.cpp.

Member Function Documentation

◆ operator!=()

bool Vector2::operator!= ( const Vector2 v) const
inline

Definition at line 91 of file test_operator_overloading.cpp.

◆ operator*() [1/2]

Vector2 Vector2::operator* ( float  value) const
inline

Definition at line 50 of file test_operator_overloading.cpp.

◆ operator*() [2/2]

Vector2 Vector2::operator* ( const Vector2 v) const
inline

Definition at line 52 of file test_operator_overloading.cpp.

◆ operator*=() [1/2]

Vector2& Vector2::operator*= ( float  v)
inline

Definition at line 64 of file test_operator_overloading.cpp.

◆ operator*=() [2/2]

Vector2& Vector2::operator*= ( const Vector2 v)
inline

Definition at line 74 of file test_operator_overloading.cpp.

◆ operator+() [1/2]

Vector2 Vector2::operator+ ( const Vector2 v) const
inline

Definition at line 46 of file test_operator_overloading.cpp.

◆ operator+() [2/2]

Vector2 Vector2::operator+ ( float  value) const
inline

Definition at line 49 of file test_operator_overloading.cpp.

◆ operator+=()

Vector2& Vector2::operator+= ( const Vector2 v)
inline

Definition at line 54 of file test_operator_overloading.cpp.

◆ operator-() [1/3]

Vector2 Vector2::operator- ( void  ) const
inline

Definition at line 45 of file test_operator_overloading.cpp.

◆ operator-() [2/3]

Vector2 Vector2::operator- ( const Vector2 v) const
inline

Definition at line 47 of file test_operator_overloading.cpp.

◆ operator-() [3/3]

Vector2 Vector2::operator- ( float  value) const
inline

Definition at line 48 of file test_operator_overloading.cpp.

◆ operator-=()

Vector2& Vector2::operator-= ( const Vector2 v)
inline

Definition at line 59 of file test_operator_overloading.cpp.

◆ operator/() [1/2]

Vector2 Vector2::operator/ ( float  value) const
inline

Definition at line 51 of file test_operator_overloading.cpp.

◆ operator/() [2/2]

Vector2 Vector2::operator/ ( const Vector2 v) const
inline

Definition at line 53 of file test_operator_overloading.cpp.

◆ operator/=() [1/2]

Vector2& Vector2::operator/= ( float  v)
inline

Definition at line 69 of file test_operator_overloading.cpp.

◆ operator/=() [2/2]

Vector2& Vector2::operator/= ( const Vector2 v)
inline

Definition at line 79 of file test_operator_overloading.cpp.

◆ operator=() [1/2]

Vector2& Vector2::operator= ( const Vector2 v)
inline

Definition at line 26 of file test_operator_overloading.cpp.

◆ operator=() [2/2]

Vector2& Vector2::operator= ( Vector2 &&  v)
inlinenoexcept

Definition at line 32 of file test_operator_overloading.cpp.

◆ operator==()

bool Vector2::operator== ( const Vector2 v) const
inline

Definition at line 90 of file test_operator_overloading.cpp.

◆ toString()

std::string Vector2::toString ( ) const
inline

Definition at line 41 of file test_operator_overloading.cpp.

Friends And Related Function Documentation

◆ operator*

Vector2 operator* ( float  f,
const Vector2 v 
)
friend

Definition at line 87 of file test_operator_overloading.cpp.

◆ operator+

Vector2 operator+ ( float  f,
const Vector2 v 
)
friend

Definition at line 85 of file test_operator_overloading.cpp.

◆ operator-

Vector2 operator- ( float  f,
const Vector2 v 
)
friend

Definition at line 86 of file test_operator_overloading.cpp.

◆ operator/

Vector2 operator/ ( float  f,
const Vector2 v 
)
friend

Definition at line 88 of file test_operator_overloading.cpp.

Member Data Documentation

◆ x

float Vector2::x
private

Definition at line 94 of file test_operator_overloading.cpp.

◆ y

float Vector2::y
private

Definition at line 94 of file test_operator_overloading.cpp.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:41:10