Do not display trailing zeroes for integer angles.
Angles that aren't an integral number of degrees are extremely rare, and the label is often in a tight space, which warrants special-casing this.
This commit is contained in:
parent
7a01c840d3
commit
bcb484e941
|
@ -52,7 +52,11 @@ double Constraint::EllipticalInterpolation(double rx, double ry, double theta) {
|
|||
std::string Constraint::Label(void) {
|
||||
std::string result;
|
||||
if(type == ANGLE) {
|
||||
if(valA == floor(valA)) {
|
||||
result = ssprintf("%.0f°", valA);
|
||||
} else {
|
||||
result = ssprintf("%.2f°", valA);
|
||||
}
|
||||
} else if(type == LENGTH_RATIO) {
|
||||
result = ssprintf("%.3f:1", valA);
|
||||
} else if(type == COMMENT) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user