#include <vector2D.hpp>
Metody publiczne | |
double | argument () |
double | distance (Vector2D vec) |
double | module () |
Vector2D | move (double alpha, double dist) |
Vector2D & | operator * (const double value) |
Vector2D & | operator * (const int value) |
bool | operator!= (const Vector2D &vec) const |
Vector2D & | operator+ (const Vector2D &vec) |
Vector2D & | operator- (const Vector2D &vec) |
Vector2D & | operator/ (const double value) |
Vector2D & | operator/ (const int value) |
Vector2D & | operator= (const Vector2D &vec) |
bool | operator== (const Vector2D &vec1) const |
double | operator[] (unsigned int idx) const |
double & | operator[] (unsigned int idx) |
Vector2D (double a_, double b_) | |
Vector2D () | |
Atrybuty chronione | |
double | a |
double | b |
Vector2D::Vector2D | ( | ) |
Konstruktor, ustala wspolczynniki na 0
Vector2D::Vector2D | ( | double | a_, | |
double | b_ | |||
) |
Konstruktor, z inicjalizacja wspolczynnikow
double Vector2D::argument | ( | ) |
Wyznacza argument.
double Vector2D::distance | ( | Vector2D | vec | ) |
Zwraca odleglosc miedzy dwoma punktami (wspolrzedne biezacego wektora i wspolrzedne wektora podanego jako param).
vec | wektor |
double Vector2D::module | ( | ) |
Wylicza modul
Vector2D Vector2D::move | ( | double | alpha, | |
double | dist | |||
) |
Przesuwa punkt o zadane odleglosc i kat
alpha | - kat [rad] | |
dist | - odleglosc |
Vector2D & Vector2D::operator * | ( | const double | value | ) |
Vector2D & Vector2D::operator * | ( | const int | value | ) |
bool Vector2D::operator!= | ( | const Vector2D & | vec | ) | const |
Vector2D & Vector2D::operator/ | ( | const double | value | ) |
Vector2D & Vector2D::operator/ | ( | const int | value | ) |
bool Vector2D::operator== | ( | const Vector2D & | vec1 | ) | const |
double Vector2D::operator[] | ( | unsigned int | idx | ) | const |
double & Vector2D::operator[] | ( | unsigned int | idx | ) |
double Vector2D::a [protected] |
double Vector2D::b [protected] |