Skip to content

Commit

Permalink
changed some if's to else if
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslan-ilesik authored Oct 5, 2023
1 parent 5587abb commit f22e75a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/dpp/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,17 +311,14 @@ namespace dpp {
const auto hue_to_rgb = [](double p, double q, double t){
if (t < 0) {
t += 1;
}
if (t > 1) {
} else if (t > 1) {
t -= 1;
}
if (t < 1.0 / 6.0) {
return p + (q - p) * 6.0 * t;
}
if (t < 0.5) {
} else if (t < 0.5) {
return q;
}
if (t < 2.0 / 3.0) {
} else if (t < 2.0 / 3.0) {
return p + (q - p) * (2.0 / 3.0 - t) * 6.0;
}
return p;
Expand Down

0 comments on commit f22e75a

Please sign in to comment.