Math supporting Clang Vector Extension
This commit is contained in:
parent
4ddf4679b4
commit
fee3054638
1 changed files with 1080 additions and 1837 deletions
|
|
@ -3722,7 +3722,7 @@ int GuiColorPicker(Rectangle bounds, const char *text, Color *color)
|
|||
// NOTE: this conversion can cause low hue-resolution, if the r, g and b value are very similar, which causes the hue bar to shift around when only the GuiColorPanel is used.
|
||||
Vector3 hsv = ConvertRGBtoHSV(RAYGUI_CLITERAL(Vector3){ (*color).r/255.0f, (*color).g/255.0f, (*color).b/255.0f });
|
||||
|
||||
GuiColorBarHue(boundsHue, NULL, &hsv.x);
|
||||
GuiColorBarHue(boundsHue, NULL, (float*)&hsv);
|
||||
|
||||
//color.a = (unsigned char)(GuiColorBarAlpha(boundsAlpha, (float)color.a/255.0f)*255.0f);
|
||||
Vector3 rgb = ConvertHSVtoRGB(hsv);
|
||||
|
|
@ -3756,7 +3756,7 @@ int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv)
|
|||
|
||||
const Rectangle boundsHue = { (float)bounds.x + bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_PADDING), (float)bounds.y, (float)GuiGetStyle(COLORPICKER, HUEBAR_WIDTH), (float)bounds.height };
|
||||
|
||||
GuiColorBarHue(boundsHue, NULL, &colorHsv->x);
|
||||
GuiColorBarHue(boundsHue, NULL, (float*)&colorHsv);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -5718,4 +5718,4 @@ static int GetCodepointNext(const char *text, int *codepointSize)
|
|||
}
|
||||
#endif // RAYGUI_STANDALONE
|
||||
|
||||
#endif // RAYGUI_IMPLEMENTATION
|
||||
#endif // RAYGUI_IMPLEMENTATION
|
||||
|
|
|
|||
Loading…
Reference in a new issue