From 5587abb6bd1cfdb9a242c229814307258a58cb91 Mon Sep 17 00:00:00 2001 From: ruslan-ilesik Date: Thu, 5 Oct 2023 15:46:10 -0400 Subject: [PATCH] even more spelling and style fixes --- include/dpp/utility.h | 8 ++++---- src/dpp/utility.cpp | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/dpp/utility.h b/include/dpp/utility.h index c021af12ba..bf7f416cd3 100644 --- a/include/dpp/utility.h +++ b/include/dpp/utility.h @@ -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); @@ -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); diff --git a/src/dpp/utility.cpp b/src/dpp/utility.cpp index cf52a30710..703815def1 100644 --- a/src/dpp/utility.cpp +++ b/src/dpp/utility.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -305,7 +304,7 @@ namespace dpp { double hue = static_cast(h) / 360.0; double saturation = static_cast(s) / 100.0; double lightness = static_cast(l) / 100.0; - return hsl(hue,saturation,lightness); + return hsl(hue, saturation, lightness); } uint32_t hsl(double h, double s, double l) { @@ -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; }; @@ -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 parameters, cmd_result_t callback) {