Files
swift-estimated-pressures-core/Sources/SharedModels/Velocity.swift
2024-05-24 16:44:41 -04:00

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())
}
}