Files
swift-estimated-pressures-core/Sources/SharedModels/Velocity.swift

19 lines
406 B
Swift

import Foundation
public struct Velocity: Equatable, Sendable {
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())
}
}