Fade2D Documentation pages v2.12
Delaunay Features
GEOM_FADE2D::Vector2 Class Reference

Vector. More...

#include <Vector2.h>

Public Member Functions

 Vector2 ()
 Default constructor. More...
 
 Vector2 (const double x_, const double y_)
 Constructor.
 
 Vector2 (const Vector2 &v_)
 Copy constructor. More...
 
bool isDegenerate () const
 isDegenerate More...
 
double length () const
 Get the length of the vector.
 
double operator* (const Vector2 &other) const
 Scalar product. More...
 
Vector2 operator* (double val) const
 Multiplication. More...
 
Vector2 operator/ (double val) const
 Division. More...
 
Vector2operator= (const Vector2 &other)
 Assignment operator.
 
Vector2 orthogonalVector () const
 
void set (const double x_, const double y_)
 Set the values.
 
double sqLength () const
 Get the squared length of the vector.
 
double x () const
 Get the x-value.
 
double y () const
 Get the y-value.
 

Protected Attributes

double valX
 
double valY
 

Detailed Description

This class represents a vector in 2D

Constructor & Destructor Documentation

◆ Vector2() [1/2]

GEOM_FADE2D::Vector2::Vector2 ( )

The vector is initialized to (0,0)

◆ Vector2() [2/2]

GEOM_FADE2D::Vector2::Vector2 ( const Vector2 v_)

Create a copy of vector v_

Member Function Documentation

◆ isDegenerate()

bool GEOM_FADE2D::Vector2::isDegenerate ( ) const
Returns
true if the vector length is 0, false otherwise.

◆ operator*() [1/2]

double GEOM_FADE2D::Vector2::operator* ( const Vector2 other) const

Scalar product

◆ operator*() [2/2]

Vector2 GEOM_FADE2D::Vector2::operator* ( double  val) const

Multiply by a scalar value

◆ operator/()

Vector2 GEOM_FADE2D::Vector2::operator/ ( double  val) const

Divide by a scalar value


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