Commit 1bf887ed authored by Sebastian Ramacher's avatar Sebastian Ramacher

Simplify

parent 30f57798
......@@ -421,16 +421,15 @@ zathura_document_set_rotation(zathura_document_t* document, unsigned int rotatio
return;
}
document->rotate = rotation % 360;
if (document->rotate > 0 && document->rotate <= 90) {
rotation = rotation % 360;
if (rotation == 0 || rotation > 270) {
document->rotate = 0;
} else if (rotation <= 90) {
document->rotate = 90;
} else if (document->rotate > 0 && document->rotate <= 180) {
} else if (rotation <= 180) {
document->rotate = 180;
} else if (document->rotate > 0 && document->rotate <= 270) {
document->rotate = 270;
} else {
document->rotate = 0;
document->rotate = 270;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment