Skip to content

Commit

Permalink
even more spelling and style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslan-ilesik committed Oct 5, 2023
1 parent f3ccf27 commit 5587abb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions include/dpp/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ namespace dpp {
* @brief Convert doubles to HSL for sending in embeds
*
* @param h hue value, between 0 and 1 inclusive
* @param s saturation value in percentage , between 0 and 1 inclusive
* @param l lightness value in percentage , between 0 and 1 inclusive
* @param s saturation value in percentage, between 0 and 1 inclusive
* @param l lightness value in percentage, between 0 and 1 inclusive
* @return uint32_t returned integer colour value
*/
uint32_t DPP_EXPORT hsl(double h, double s, double l);
Expand All @@ -434,8 +434,8 @@ namespace dpp {
* @brief Convert ints to HSL for sending in embeds
*
* @param h hue value, between 0 and 360 inclusive
* @param s saturation value in percentage , between 0 and 100 inclusive
* @param l lightness value in percentage , between 0 and 100 inclusive
* @param s saturation value in percentage, between 0 and 100 inclusive
* @param l lightness value in percentage, between 0 and 100 inclusive
* @return uint32_t returned integer colour value
*/
uint32_t DPP_EXPORT hsl(int h, int s, int l);
Expand Down
7 changes: 3 additions & 4 deletions src/dpp/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <fstream>
#include <streambuf>
#include <array>
#include <cmath>
#include <dpp/cluster.h>
#include <dpp/dispatcher.h>
#include <dpp/message.h>
Expand Down Expand Up @@ -305,7 +304,7 @@ namespace dpp {
double hue = static_cast<double>(h) / 360.0;
double saturation = static_cast<double>(s) / 100.0;
double lightness = static_cast<double>(l) / 100.0;
return hsl(hue,saturation,lightness);
return hsl(hue, saturation, lightness);
}

uint32_t hsl(double h, double s, double l) {
Expand All @@ -323,7 +322,7 @@ namespace dpp {
return q;
}
if (t < 2.0 / 3.0) {
return p + (q - p) * (2.0 / 3.0 - t) * 6.0;
return p + (q - p) * (2.0 / 3.0 - t) * 6.0;
}
return p;
};
Expand All @@ -339,7 +338,7 @@ namespace dpp {
g = hue_to_rgb(p, q, h);
b = hue_to_rgb(p, q, h - 1.0 / 3.0);
}
return rgb(r,g,b);
return rgb(r, g, b);
}

void exec(const std::string& cmd, std::vector<std::string> parameters, cmd_result_t callback) {
Expand Down

0 comments on commit 5587abb

Please sign in to comment.