I have a Range with float numbers. I need to get the first and the last elements of the range. With Range everything works fine. However when I try to get values from float range I get error "Ambiguous reference to member 'first'". How do I get values from float range?
I tried casting, unwrapping - same error. Looked at posts with similar problem but nothing seems to work.
let range: Range = 1.0..<3.22
let first: CGFloat = range.first (!)(Ambiguous reference to member 'first')
I expect to get the first item from the range, instead I get an error.