aboutsummaryrefslogtreecommitdiff
path: root/colorscale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'colorscale.cpp')
-rw-r--r--colorscale.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/colorscale.cpp b/colorscale.cpp
index 32d0f25..ec52d2d 100644
--- a/colorscale.cpp
+++ b/colorscale.cpp
@@ -37,15 +37,15 @@ Color::Color(float r, float g, float b, float a)
void Color::getRgbF(float *r, float *g, float *b) const
{
- *r = round(static_cast<float>(this->r) / 255.0f);
- *g = round(static_cast<float>(this->g) / 255.0f);
- *b = round(static_cast<float>(this->b) / 255.0f);
+ *r = static_cast<float>(this->r) / 255.0f;
+ *g = static_cast<float>(this->g) / 255.0f;
+ *b = static_cast<float>(this->b) / 255.0f;
}
void Color::getRgbF(float *r, float *g, float *b, float *a) const
{
getRgbF(r, g, b);
- *a = round(static_cast<float>(this->a) / 255.0f);
+ *a = static_cast<float>(this->a) / 255.0f;
}
void Color::setRgb(int r, int g, int b)