Use EXACT for checking theta
This commit is contained in:
parent
6b91ab5778
commit
b316a8863b
@ -260,8 +260,7 @@ void GraphicsWindow::PasteClipboard(Vector trans, double theta, double scale) {
|
|||||||
case Constraint::Type::HORIZONTAL:
|
case Constraint::Type::HORIZONTAL:
|
||||||
case Constraint::Type::VERTICAL:
|
case Constraint::Type::VERTICAL:
|
||||||
// When rotating 90 or 270 degrees, swap the vertical / horizontal constaints
|
// When rotating 90 or 270 degrees, swap the vertical / horizontal constaints
|
||||||
dbp("Remainder: %f", fmod(theta + (PI / 2), PI));
|
if (EXACT(fmod(theta + (PI/2), PI) == 0)) {
|
||||||
if (fmod(theta + (PI/2), PI) == 0) {
|
|
||||||
if(c.type == Constraint::Type::HORIZONTAL) {
|
if(c.type == Constraint::Type::HORIZONTAL) {
|
||||||
c.type = Constraint::Type::VERTICAL;
|
c.type = Constraint::Type::VERTICAL;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user