#include <Vector2.hpp>
Public Methods | |
JVector2 () | |
JVector2 (const JVector3 &obj) | |
JVector2 (const JVector2 &obj) | |
JVector2 (double x, double y) | |
virtual | ~JVector2 () |
void | print () |
JVector2 | rotate (double rad) |
void | add (JVector2) |
void | subtract (JVector2) |
void | multiply (double) |
void | divide (double) |
double | dot (JVector2) |
void | cross (JVector2) |
void | negative () |
double | length () |
void | unit () |
double | comp (JVector2) |
JVector2 | proj (JVector2) |
double | operator[] (int) |
JVector2 | operator() (double, double) |
JVector2 | operator+ (JVector2) |
JVector2 | operator- (JVector2) |
JVector2 | operator * (double) |
JVector2 | operator/ (double) |
double | operator * (JVector2) |
JVector2 | operator% (JVector2) |
void | operator+= (JVector2 val) |
void | operator-= (JVector2 val) |
void | operator *= (double val) |
void | operator/= (double val) |
void | operator%= (JVector2 val) |
JVector2 | operator- () |
double | operator! () |
JVector2 | operator~ () |
bool | operator== (JVector2 val) |
JVector2 () | |
JVector2 (const JVector3 &obj) | |
JVector2 (const JVector2 &obj) | |
JVector2 (double x, double y) | |
virtual | ~JVector2 () |
void | print () |
JVector2 | rotate (double rad) |
void | add (JVector2) |
void | subtract (JVector2) |
void | multiply (double) |
void | divide (double) |
double | dot (JVector2) |
void | cross (JVector2) |
void | negative () |
double | length () |
void | unit () |
double | comp (JVector2) |
JVector2 | proj (JVector2) |
double | operator[] (int) |
JVector2 | operator() (double, double) |
JVector2 | operator+ (JVector2) |
JVector2 | operator- (JVector2) |
JVector2 | operator * (double) |
JVector2 | operator/ (double) |
double | operator * (JVector2) |
JVector2 | operator% (JVector2) |
void | operator+= (JVector2 val) |
void | operator-= (JVector2 val) |
void | operator *= (double val) |
void | operator/= (double val) |
void | operator%= (JVector2 val) |
JVector2 | operator- () |
double | operator! () |
JVector2 | operator~ () |
bool | operator== (JVector2 val) |
Public Attributes | |
double | v [2] |
Friends | |
JVector2 | operator * (double, JVector2) |
JVector2 | operator/ (double, JVector2) |
JVector2 | operator * (double, JVector2) |
JVector2 | operator/ (double, JVector2) |
|
Definition at line 17 of file Vector2.hpp. 00017 {} |
|
Definition at line 14 of file Vector2.cpp. |
|
Definition at line 6 of file Vector2.cpp. |
|
Definition at line 21 of file Vector2.hpp. 00021 { 00022 v[0] = x; 00023 v[1] = y; 00024 } |
|
Definition at line 26 of file Vector2.hpp. 00026 {} |
|
Definition at line 17 of file Vector2.hpp. 00017 {} |
|
|
|
|
|
Definition at line 21 of file Vector2.hpp. 00021 { 00022 v[0] = x; 00023 v[1] = y; 00024 } |
|
Definition at line 26 of file Vector2.hpp. 00026 {} |
|
|
|
Definition at line 42 of file Vector2.cpp. Referenced by operator+=().
|
|
|
|
Definition at line 105 of file Vector2.cpp. 00106 { 00107 return (*this * obj) / !*this; 00108 } |
|
|
|
Referenced by operator%=().
|
|
|
|
Definition at line 66 of file Vector2.cpp. Referenced by operator/=().
00067 { 00068 v[0] = v[0] / div; 00069 v[1] = v[1] / div; 00070 } |
|
|
|
Definition at line 74 of file Vector2.cpp. |
|
|
|
Definition at line 89 of file Vector2.cpp. 00090 { 00091 return (double) sqrt(v[0] * v[0] + v[1] * v[1]); 00092 } |
|
|
|
Definition at line 58 of file Vector2.cpp. Referenced by operator *=().
00059 { 00060 v[0] = v[0] * mult; 00061 v[1] = v[1] * mult; 00062 } |
|
|
|
Definition at line 81 of file Vector2.cpp. 00082 { 00083 v[0] = -v[0]; 00084 v[1] = -v[1]; 00085 } |
|
|
|
|
|
Definition at line 195 of file Vector2.cpp. |
|
Definition at line 155 of file Vector2.cpp. |
|
Definition at line 61 of file Vector2.hpp. 00061 { multiply(val); } |
|
Definition at line 61 of file Vector2.hpp. 00061 { multiply(val); } |
|
|
|
Definition at line 214 of file Vector2.cpp. 00215 { 00216 return (double) sqrt(v[0] * v[0] + v[1] * v[1]); 00217 } |
|
|
|
|
|
Definition at line 63 of file Vector2.hpp. 00063 { cross(val); } |
|
Definition at line 63 of file Vector2.hpp. 00063 { cross(val); } |
|
|
|
Definition at line 126 of file Vector2.cpp. 00127 { 00128 v[0] = x; 00129 v[1] = y; 00130 return *this; 00131 } |
|
|
|
Definition at line 135 of file Vector2.cpp. |
|
Definition at line 59 of file Vector2.hpp. 00059 { add(val); } |
|
Definition at line 59 of file Vector2.hpp. 00059 { add(val); } |
|
|
|
|
|
Definition at line 204 of file Vector2.cpp. |
|
Definition at line 145 of file Vector2.cpp. |
|
Definition at line 60 of file Vector2.hpp. 00060 { subtract(val); } |
|
Definition at line 60 of file Vector2.hpp. 00060 { subtract(val); } |
|
|
|
Definition at line 175 of file Vector2.cpp. |
|
Definition at line 62 of file Vector2.hpp. 00062 { divide(val); } |
|
Definition at line 62 of file Vector2.hpp. 00062 { divide(val); } |
|
Definition at line 69 of file Vector2.hpp. |
|
Definition at line 69 of file Vector2.hpp. |
|
|
|
Definition at line 118 of file Vector2.cpp. |
|
|
|
Definition at line 221 of file Vector2.cpp. |
|
|
|
|
|
|
|
Definition at line 112 of file Vector2.cpp. 00113 { 00114 JVector2 a = *this, b = obj; 00115 return ((a * b) / (!a * !a)) * a; 00116 } |
|
|
|
Definition at line 29 of file Vector2.cpp. |
|
|
|
Definition at line 50 of file Vector2.cpp. Referenced by operator-=().
|
|
|
|
Definition at line 96 of file Vector2.cpp. 00097 { 00098 double len = (double) sqrt(v[0] * v[0] + v[1] * v[1]); 00099 v[0] = v[0] / len; 00100 v[1] = v[1] / len; 00101 } |
|
Definition at line 165 of file Vector2.cpp. |
|
Definition at line 165 of file Vector2.cpp. |
|
Definition at line 185 of file Vector2.cpp. |
|
Definition at line 185 of file Vector2.cpp. |
|
Definition at line 80 of file Vector2.hpp. Referenced by JVector2(), JVector3::JVector3(), add(), dot(), JMatrix22::mult(), operator *(), operator *(), operator+(), operator-(), operator/(), operator/(), operator==(), operator~(), rotate(), and subtract().
|