This commit is contained in:
ackimixs
2024-04-10 18:09:10 +02:00
parent 8e1270e626
commit be893becf9

View File

@@ -30,7 +30,7 @@ void MyTCPClient::handleMessage(const std::string &message) {
} else if (token[2] == "angle") {
std::vector<std::string> args = TCPSocket::split(token[3], ",");
double angle = std::stof(args[1]) / 100;
double angle = std::stod(args[1]) / 100;
//convert to degres
double angleDegrees = angle * 180 / 3.14159265359;
@@ -42,7 +42,7 @@ void MyTCPClient::handleMessage(const std::string &message) {
} else if (token[2] == "set") {
std::vector<std::string> args = TCPSocket::split(token[3], ",");
double angle = std::stof(args[2]) / 100;
double angle = std::stod(args[2]) / 100;
//convert to degres
double angleDegrees = angle * 180 / 3.14159265359;