SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
simlib3::Value2D Class Reference

2D vector value More...

#include <simlib2D.h>

Public Member Functions

 Value2D (double x, double y)
double x () const
double y () const
Value2D operator+ (Value2D b)
Value2D operator- (Value2D b)
void Print ()

Private Attributes

double _x
double _y

Friends

double abs (const Value2D &a)
Value2D operator+ (const Value2D &a, const Value2D &b)
Value2D operator- (const Value2D &a, const Value2D &b)
Value2D operator- (const Value2D &a)
Value2D operator* (const Value2D &a, const double b)
Value2D operator* (const double a, const Value2D &b)
double scalar_product (const Value2D &a, const Value2D &b)
Value2D operator/ (const Value2D &a, const double b)

Detailed Description

2D vector value

Definition at line 31 of file simlib2D.h.

Constructor & Destructor Documentation

◆ Value2D()

simlib3::Value2D::Value2D ( double x,
double y )
inline

Member Function Documentation

◆ operator+()

Value2D simlib3::Value2D::operator+ ( Value2D b)
inline

Definition at line 40 of file simlib2D.h.

References _x, _y, and Value2D().

◆ operator-()

Value2D simlib3::Value2D::operator- ( Value2D b)
inline

Definition at line 41 of file simlib2D.h.

References _x, _y, and Value2D().

◆ Print()

void simlib3::Value2D::Print ( )
inline

Definition at line 42 of file simlib2D.h.

References _x, _y, and Print().

Referenced by simlib3::aContiBlock2D::Print(), simlib3::Print(), and Print().

◆ x()

double simlib3::Value2D::x ( ) const
inline

◆ y()

double simlib3::Value2D::y ( ) const
inline

◆ abs

double abs ( const Value2D & a)
friend

Definition at line 38 of file simlib2D.cc.

References _x, _y, abs, and Value2D().

Referenced by abs.

◆ operator* [1/2]

Value2D operator* ( const double a,
const Value2D & b )
friend

Definition at line 73 of file simlib2D.cc.

References Value2D().

◆ operator* [2/2]

Value2D operator* ( const Value2D & a,
const double b )
friend

Definition at line 68 of file simlib2D.cc.

References _x, _y, and Value2D().

◆ operator+

Value2D operator+ ( const Value2D & a,
const Value2D & b )
friend

Definition at line 43 of file simlib2D.cc.

References _x, _y, and Value2D().

◆ operator- [1/2]

Value2D operator- ( const Value2D & a)
friend

Definition at line 53 of file simlib2D.cc.

References _x, _y, and Value2D().

◆ operator- [2/2]

Value2D operator- ( const Value2D & a,
const Value2D & b )
friend

Definition at line 48 of file simlib2D.cc.

References _x, _y, and Value2D().

◆ operator/

Value2D operator/ ( const Value2D & a,
const double b )
friend

Definition at line 83 of file simlib2D.cc.

References _x, _y, and Value2D().

◆ scalar_product

double scalar_product ( const Value2D & a,
const Value2D & b )
friend

Definition at line 78 of file simlib2D.cc.

References _x, _y, scalar_product, and Value2D().

Referenced by scalar_product.

Member Data Documentation

◆ _x

double simlib3::Value2D::_x
private

◆ _y

double simlib3::Value2D::_y
private

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