diff options
author | Hubert Jarosz <marqin.pl@gmail.com> | 2016-03-09 00:00:52 +0100 |
---|---|---|
committer | Hubert Jarosz <marqin.pl@gmail.com> | 2016-03-09 00:00:52 +0100 |
commit | 4a4f2479146aa33e235ed57cde311efda68d3c8f (patch) | |
tree | cf91f2869ff8f058c6682569fb31e22e5ee736ad /core/color.h | |
parent | 1dad6eca812e5c2e313b54265114de8a1d73d999 (diff) | |
download | redot-engine-4a4f2479146aa33e235ed57cde311efda68d3c8f.tar.gz |
remove trailing whitespace
Diffstat (limited to 'core/color.h')
-rw-r--r-- | core/color.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/color.h b/core/color.h index d0a1e8835c..5b671d5f62 100644 --- a/core/color.h +++ b/core/color.h @@ -37,13 +37,13 @@ struct Color { union { - + struct { float r; float g; float b; float a; - }; + }; float components[4]; }; @@ -58,28 +58,28 @@ struct Color { float get_v() const; void set_hsv(float p_h, float p_s, float p_v, float p_alpha=1.0); - _FORCE_INLINE_ float& operator[](int idx) { + _FORCE_INLINE_ float& operator[](int idx) { return components[idx]; } - _FORCE_INLINE_ const float& operator[](int idx) const { + _FORCE_INLINE_ const float& operator[](int idx) const { return components[idx]; } - + void invert(); void contrast(); Color inverted() const; Color contrasted() const; _FORCE_INLINE_ Color linear_interpolate(const Color& p_b, float p_t) const { - + Color res=*this; - + res.r+= (p_t * (p_b.r-r)); res.g+= (p_t * (p_b.g-g)); res.b+= (p_t * (p_b.b-b)); res.a+= (p_t * (p_b.a-a)); - - return res; + + return res; } _FORCE_INLINE_ Color blend(const Color& p_over) const { |