Skip to content

Commit

Permalink
Restore Float80 support (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis authored Aug 29, 2020
1 parent 8d96d7f commit fa11f64
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Sources/Gen/Gen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,19 @@ extension Gen where Value == Float {
}
}

#if !(os(Windows) || os(Android)) && (arch(i386) || arch(x86_64))
extension Gen where Value == Float80 {
/// Returns a generator of random values within the specified range.
///
/// - Parameter range: The range in which to create a random value. `range` must be finite.
/// - Returns: A generator of random values within the bounds of range.
@inlinable
public static func float80(in range: ClosedRange<Value>) -> Gen {
return Gen { rng in .random(in: range, using: &rng) }
}
}
#endif

#if canImport(CoreGraphics)
import CoreGraphics

Expand Down

0 comments on commit fa11f64

Please sign in to comment.