Skip to content

Commit 92d220c

Browse files
committed
docs: Update comments and documentation
1 parent 3b22c06 commit 92d220c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/SwiftDevKit/Conversion/Color+Conversion.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ public extension Color {
178178
var hueComponent = third
179179
if hueComponent < 0 { hueComponent += 1 }
180180
if hueComponent > 1 { hueComponent -= 1 }
181-
if hueComponent < 1/6 { return primary + (secondary - primary) * 6 * hueComponent }
182-
if hueComponent < 1/2 { return secondary }
183-
if hueComponent < 2/3 { return primary + (secondary - primary) * (2/3 - hueComponent) * 6 }
181+
if hueComponent < 1 / 6 { return primary + (secondary - primary) * 6 * hueComponent }
182+
if hueComponent < 1 / 2 { return secondary }
183+
if hueComponent < 2 / 3 { return primary + (secondary - primary) * (2 / 3 - hueComponent) * 6 }
184184
return primary
185185
}
186186

@@ -190,9 +190,9 @@ public extension Color {
190190
hsl.lightness + hsl.saturation - hsl.lightness * hsl.saturation
191191
let primaryComponent = 2 * hsl.lightness - secondaryComponent
192192

193-
let red = hueToRGB(primaryComponent, secondaryComponent, normalizedHue + 1/3)
193+
let red = hueToRGB(primaryComponent, secondaryComponent, normalizedHue + 1 / 3)
194194
let green = hueToRGB(primaryComponent, secondaryComponent, normalizedHue)
195-
let blue = hueToRGB(primaryComponent, secondaryComponent, normalizedHue - 1/3)
195+
let blue = hueToRGB(primaryComponent, secondaryComponent, normalizedHue - 1 / 3)
196196

197197
self.init(red: red, green: green, blue: blue, alpha: 1.0)
198198
}

0 commit comments

Comments
 (0)