mirror of
https://github.com/modelec/connectors.git
synced 2026-03-18 21:50:33 +01:00
stod
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user