a 2d vector More...
#include "vector.h"
Public Member Functions | |
Vector2D () | |
Constructor: (0.0, 0.0) | |
Vector2D (double _x, double _y) | |
double | GetLength () const |
Compute the length (magnitude) of the vector. | |
double | GetLengthSquared () const |
Compute the squared length of the vector. | |
Public Attributes | |
double | x |
x coordinate of vector | |
double | y |
y coordinate of vector | |
Friends | |
double | CalculateDistance (const Vector2D &a, const Vector2D &b) |
Calculate the Cartesian distance between two points. | |
double | CalculateDistanceSquared (const Vector2D &a, const Vector2D &b) |
Calculate the squared Cartesian distance between two points. | |
bool | operator!= (const Vector2D &a, const Vector2D &b) |
Inequality operator. | |
double | operator* (const Vector2D &a, const Vector2D &b) |
Dot product operator. | |
Vector2D | operator* (const Vector2D &a, double b) |
Scalar multiplication operator. | |
Vector2D | operator* (double a, const Vector2D &b) |
Scalar multiplication operator. | |
Vector2D | operator+ (const Vector2D &a, const Vector2D &b) |
Addition operator. | |
Vector2D | operator- (const Vector2D &a, const Vector2D &b) |
Subtraction operator. | |
bool | operator< (const Vector2D &a, const Vector2D &b) |
Less than comparison operator. | |
std::ostream & | operator<< (std::ostream &os, const Vector2D &vector) |
Output streamer. | |
bool | operator<= (const Vector2D &a, const Vector2D &b) |
Less than or equal to comparison operator. | |
bool | operator== (const Vector2D &a, const Vector2D &b) |
Equality operator. | |
bool | operator> (const Vector2D &a, const Vector2D &b) |
Greater than comparison operator. | |
bool | operator>= (const Vector2D &a, const Vector2D &b) |
Greater than or equal to comparison operator. | |
std::istream & | operator>> (std::istream &is, Vector2D &vector) |
Input streamer. | |
[in] | _x | X coordinate of vector |
[in] | _y | Y coordinate of vector |
Create vector (_x, _y)
Definition at line 55 of file vector.cc.
References NS_LOG_FUNCTION.
ns3::Vector2D::Vector2D | ( | ) |
double ns3::Vector2D::GetLength | ( | ) | const |
Compute the length (magnitude) of the vector.
Definition at line 77 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 91 of file vector.cc.
References NS_LOG_FUNCTION, x, and y.
|
friend |
|
friend |
double ns3::Vector2D::x |
x coordinate of vector
Definition at line 207 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 208 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().