19 lines
396 B
Swift
19 lines
396 B
Swift
import Foundation
|
|
|
|
public struct Velocity: Equatable {
|
|
public var airflow: Double
|
|
public var dimension: PlenumDimension
|
|
|
|
public var value: Double {
|
|
airflow / dimension.areaInSquareFeet
|
|
}
|
|
|
|
public var flagged: Flagged { .velocity(self) }
|
|
}
|
|
|
|
extension Flagged {
|
|
public static func velocity(_ velocity: Velocity) -> Self {
|
|
.init(wrappedValue: velocity.value, .velocity())
|
|
}
|
|
}
|