diff options
| author | raysan5 <[email protected]> | 2020-09-07 19:33:06 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2020-09-07 19:33:06 +0200 |
| commit | f1ed8be5d7e2d966d577a3fd28e53447a398b3b6 (patch) | |
| tree | ffedc95824890dad3ee654d1a746e1b37f9d509e /examples | |
| parent | 85d5744679a14ca52ca40f924ab4f7614bf7e17c (diff) | |
| download | raylib-f1ed8be5d7e2d966d577a3fd28e53447a398b3b6.tar.gz raylib-f1ed8be5d7e2d966d577a3fd28e53447a398b3b6.zip | |
REDESIGNED: ColorFromHSV()
Replaced Vector3 by direct values, easier to use and understand
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/models/models_waving_cubes.c | 2 | ||||
| -rw-r--r-- | examples/text/text_unicode.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/examples/models/models_waving_cubes.c b/examples/models/models_waving_cubes.c index f6309bd6..764dc5e7 100644 --- a/examples/models/models_waving_cubes.c +++ b/examples/models/models_waving_cubes.c @@ -84,7 +84,7 @@ int main() }; // Pick a color with a hue depending on cube position for the rainbow color effect - Color cubeColor = ColorFromHSV((Vector3){ (float)(((x + y + z)*18)%360), 0.75f, 0.9f }); + Color cubeColor = ColorFromHSV((float)(((x + y + z)*18)%360), 0.75f, 0.9f); // Calculate cube size float cubeSize = (2.4f - scale)*blockScale; diff --git a/examples/text/text_unicode.c b/examples/text/text_unicode.c index 3a4ed482..161d4677 100644 --- a/examples/text/text_unicode.c +++ b/examples/text/text_unicode.c @@ -311,8 +311,7 @@ static void RandomizeEmoji(void) emoji[i].index = GetRandomValue(0, 179)*5; // Generate a random color for this emoji - Vector3 hsv = {(start*(i + 1))%360, 0.6f, 0.85f}; - emoji[i].color = Fade(ColorFromHSV(hsv), 0.8f); + emoji[i].color = Fade(ColorFromHSV((float)((start*(i + 1))%360), 0.6f, 0.85f), 0.8f); // Set a random message for this emoji emoji[i].message = GetRandomValue(0, SIZEOF(messages) - 1); |
