66 std::vector<std::string> tokens;
67 std::stringstream ss_position(position);
69 while (std::getline(ss_position, token,
' ')) {
70 tokens.push_back(token);
72 switch (tokens.size()) {
74 x = atof(tokens[0].c_str());
75 y = atof(tokens[1].c_str());
76 vx = atof(tokens[2].c_str());
77 vy = atof(tokens[3].c_str());
96 std::vector<std::string> tokens;
97 std::stringstream ss_position(position);
99 while (std::getline(ss_position, token,
' ')) {
100 tokens.push_back(token);
102 switch (tokens.size()) {
122 if (source_direction > 180.0) {
123 source_direction -= 360.0;
124 }
else if (source_direction <= 180.0) {
125 source_direction += 360.0;
127 double erx = cos(
Self::PI * source_direction / 180.0);
128 double ery = sin(
Self::PI * source_direction / 180.0);
131 double erxm = (180.0 * erx) / (
Self::PI * distance);
132 double erym = (180.0 * ery) / (
Self::PI * distance);
Ball The Ball lorem Ipsum
Position The Position lorem Ipsum
static Vector2D getVector2DWithXAndY(double dx, double dy)
double getBodyDirection()
double getHeadDirection()
Vector2D The Vector2D lorem Ipsum