72 if (hsv.
Y==0.0f) hsv.
X=-1.0f;
77 hsv.
X=(rgb.
Y-rgb.
Z)/delta;
79 hsv.
X=2.0f+ (rgb.
Z-rgb.
X)/delta;
81 hsv.
X=4.0f+ (rgb.
X-rgb.
Y)/delta;
83 if (hsv.
X<0.0f) hsv.
X+=360.0f;
100 if (h==360.0f) h=0.0f;
107 t=v*(1.0f-(s*(1.0f-f)));
140 if (hsv.
X<0.0f) hsv+=
Vector3(0.0f,0.0f,hsv_shift.
Z);
144 if (hsv.
X<0.0f) hsv.
X+=360.0f;
145 if (hsv.
X>360.0f) hsv.
X-=360.0f;
static Vector4 Convert_Color(unsigned color)
WWINLINE void Set(float x, float y, float z)
static float Max(float a, float b)
static float Min(float a, float b)
static float Clamp(float val, float min=0.0f, float max=1.0f)
static float Floor(float val)
void Recolor(Vector3 &rgb, const Vector3 &hsv_shift)
void HSV_To_RGB(Vector3 &rgb, const Vector3 &hsv)
void RGB_To_HSV(Vector3 &hsv, const Vector3 &rgb)