Skip to content

Commit 9507a7a

Browse files
authored
Merge pull request #6 from pointfreeco/float80
Expose float80 only on macOS.
2 parents a0b1e87 + b412d45 commit 9507a7a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Gen.playground/Pages/Sandbox.xcplaygroundpage/Contents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Gen.bool.set(ofAtMost: .always(3)).run()
55
Gen.float(in: 0...1)
66

77
import CoreGraphics
8-
Gen.float80(in: 0...1)
8+
Gen.cgFloat(in: 0...1)

Sources/Gen/Gen.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ extension Gen where Value == Float {
275275
}
276276
}
277277

278+
#if os(macOS)
278279
extension Gen where Value == Float80 {
279280
/// Returns a generator of random values within the specified range.
280281
///
@@ -285,6 +286,7 @@ extension Gen where Value == Float80 {
285286
return Gen { rng in .random(in: range, using: &rng) }
286287
}
287288
}
289+
#endif
288290

289291
#if canImport(CoreGraphics)
290292
import CoreGraphics

0 commit comments

Comments
 (0)