     }
 }
 
-public extension Bool {
+public extension CGFloat {
     /// SwiftRandom extension
-    public static func random() -> Bool {
-        return Int.random() % 2 == 0
+    public static func random(lower: CGFloat = 0, _ upper: CGFloat = 1) -> CGFloat {
+        return CGFloat(Float(arc4random()) / Float(UINT32_MAX)) * (upper - lower) + lower
     }
 }
 


// each type has its own random

public extension Int {
    /// SwiftRandom extension
    public static func random(lower: Int = 0, _ upper: Int = 100) -> Int {

    
    public static func randomDate() -> NSDate {
        return NSDate.random()
    }
    
    public static func randomColor(randomAlpha: Bool = false) -> UIColor {
