@@ -160,8 +160,8 @@ int iResult = 0;
160
160
161
161
case eColourHue:
162
162
{
163
- double hue1 = clr1.GetHue ();
164
- double hue2 = clr2.GetHue ();
163
+ float hue1 = clr1.GetHue ();
164
+ float hue2 = clr2.GetHue ();
165
165
if (hue1 < hue2)
166
166
{
167
167
iResult = -1 ;
@@ -177,16 +177,16 @@ int iResult = 0;
177
177
// hue the same - fall through and compare saturation (then luminance)
178
178
case eColourSaturation:
179
179
{
180
- double saturation1 = clr1.GetSaturation ();
181
- double saturation2 = clr2.GetSaturation ();
180
+ float saturation1 = clr1.GetSaturation ();
181
+ float saturation2 = clr2.GetSaturation ();
182
182
if (saturation1 < saturation2)
183
183
iResult = -1 ;
184
184
else if (saturation1 > saturation2)
185
185
iResult = 1 ;
186
186
else
187
187
{ // saturation the same - compare luminance
188
- double luminance1 = clr1.GetLuminance ();
189
- double luminance2 = clr2.GetLuminance ();
188
+ float luminance1 = clr1.GetLuminance ();
189
+ float luminance2 = clr2.GetLuminance ();
190
190
if (luminance1 < luminance2)
191
191
iResult = -1 ;
192
192
else if (luminance1 > luminance2)
@@ -197,16 +197,16 @@ int iResult = 0;
197
197
198
198
case eColourLuminance:
199
199
{
200
- double luminance1 = clr1.GetLuminance ();
201
- double luminance2 = clr2.GetLuminance ();
200
+ float luminance1 = clr1.GetLuminance ();
201
+ float luminance2 = clr2.GetLuminance ();
202
202
if (luminance1 < luminance2)
203
203
iResult = -1 ;
204
204
else if (luminance1 > luminance2)
205
205
iResult = 1 ;
206
206
else
207
207
{ // luminance the same - compare saturation
208
- double saturation1 = clr1.GetSaturation ();
209
- double saturation2 = clr2.GetSaturation ();
208
+ float saturation1 = clr1.GetSaturation ();
209
+ float saturation2 = clr2.GetSaturation ();
210
210
if (saturation1 < saturation2)
211
211
iResult = -1 ;
212
212
else if (saturation1 > saturation2)
@@ -334,9 +334,9 @@ CColor clr;
334
334
335
335
clr.SetColor (m_ctlSwatch.m_colour );
336
336
337
- double fHue = clr.GetHue ();
338
- double fSaturation = clr.GetSaturation ();
339
- double fLuminance = clr.GetLuminance ();
337
+ float fHue = clr.GetHue ();
338
+ float fSaturation = clr.GetSaturation ();
339
+ float fLuminance = clr.GetLuminance ();
340
340
341
341
CString strName;
342
342
@@ -549,7 +549,7 @@ LRESULT CColourPickerDlg::OnKickIdle(WPARAM, LPARAM)
549
549
550
550
void CColourPickerDlg::OnRandom ()
551
551
{
552
- m_ctlSwatch.m_colour = (COLORREF) ( genrand () * (double ) 0x1000000 ) ;
552
+ m_ctlSwatch.m_colour = genrand () * (double ) 0x1000000 ;
553
553
554
554
m_ctlSwatch.RedrawWindow ();
555
555
ShowName ();
0 commit comments