Good day trying to figure out how to work with a swift in a playground, you need a function, structure or extension to generate random numbers. Found just such a structure
struct Math { private static var seeded = false static func randomFractional() -> CGFloat { if !Math.seeded { let time = Int(NSDate().timeIntervalSinceReferenceDate) srand48(time) Math.seeded = true } return CGFloat(drand48()) } } Math.randomFractional() I also need for example, I in xcode the appearance of different objects in different places