@@ -17,7 +17,7 @@ public struct AirQuality: Equatable, Hashable {
...
@@ -17,7 +17,7 @@ public struct AirQuality: Equatable, Hashable {
self.index=index
self.index=index
self.advice=advice
self.advice=advice
varprogressValue=CGFloat(sqrt(0.1+(index*0.9)/400))// just to make it look nicer, so that we didn't have too short gradient circle in areas with generally good air.
varprogressValue=CGFloat(sqrt(0.1+(max(index,0)*0.9)/400))// just to make it look nicer, so that we didn't have too short gradient circle in areas with generally good air.
progressValue=max(0,progressValue)
progressValue=max(0,progressValue)
progressValue=min(1,progressValue)
progressValue=min(1,progressValue)
...
@@ -25,13 +25,21 @@ public struct AirQuality: Equatable, Hashable {
...
@@ -25,13 +25,21 @@ public struct AirQuality: Equatable, Hashable {