a 2d vector More...
#include "vector.h"
Public Member Functions | |
Vector2D () | |
Constructor: (0.0, 0.0) More... | |
Vector2D (double _x, double _y) | |
double | GetLength () const |
Compute the length (magnitude) of the vector. More... | |
double | GetLengthSquared () const |
Compute the squared length of the vector. More... | |
Public Attributes | |
double | x |
x coordinate of vector More... | |
double | y |
y coordinate of vector More... | |
Friends | |
double | CalculateDistance (const Vector2D &a, const Vector2D &b) |
Calculate the Cartesian distance between two points. More... | |
double | CalculateDistanceSquared (const Vector2D &a, const Vector2D &b) |
Calculate the squared Cartesian distance between two points. More... | |
bool | operator!= (const Vector2D &a, const Vector2D &b) |
Inequality operator. More... | |
Vector2D | operator+ (const Vector2D &a, const Vector2D &b) |
Addition operator. More... | |
Vector2D | operator- (const Vector2D &a, const Vector2D &b) |
Subtraction operator. More... | |
bool | operator< (const Vector2D &a, const Vector2D &b) |
Less than comparison operator. More... | |
std::ostream & | operator<< (std::ostream &os, const Vector2D &vector) |
Output streamer. More... | |
bool | operator<= (const Vector2D &a, const Vector2D &b) |
Less than or equal to comparison operator. More... | |
bool | operator== (const Vector2D &a, const Vector2D &b) |
Equality operator. More... | |
bool | operator> (const Vector2D &a, const Vector2D &b) |
Greater than comparison operator. More... | |
bool | operator>= (const Vector2D &a, const Vector2D &b) |
Greater than or equal to comparison operator. More... | |
std::istream & | operator>> (std::istream &is, Vector2D &vector) |
Input streamer. More... | |
ns3::Vector2D::Vector2D | ( | double | _x, |
double | _y | ||
) |
[in] | _x | X coordinate of vector |
[in] | _y | Y coordinate of vector |
Create vector (_x, _y)
Definition at line 66 of file vector.cc.
References NS_LOG_FUNCTION.
ns3::Vector2D::Vector2D | ( | ) |
double ns3::Vector2D::GetLength | ( | void | ) | const |
Compute the length (magnitude) of the vector.
Definition at line 88 of file vector.cc.
References NS_LOG_FUNCTION, x, and y.
Referenced by ns3::ThreeGppPropagationLossModel::GetShadowing().
double ns3::Vector2D::GetLengthSquared | ( | ) | const |
Compute the squared length of the vector.
Definition at line 102 of file vector.cc.
References NS_LOG_FUNCTION, x, and y.
|
friend |
|
friend |
double ns3::Vector2D::x |
x coordinate of vector
Definition at line 194 of file vector.h.
Referenced by visualizer.svgitem.SvgItem::do_get_property(), visualizer.svgitem.SvgItem::do_set_property(), visualizer.svgitem.SvgItem::do_simple_is_item_at(), visualizer.svgitem.SvgItem::do_simple_paint(), GetLength(), and GetLengthSquared().
double ns3::Vector2D::y |
y coordinate of vector
Definition at line 195 of file vector.h.
Referenced by visualizer.svgitem.SvgItem::do_get_property(), visualizer.svgitem.SvgItem::do_set_property(), visualizer.svgitem.SvgItem::do_simple_is_item_at(), visualizer.svgitem.SvgItem::do_simple_paint(), GetLength(), and GetLengthSquared().