import Foundation

/// Parameters needed to understand the volume:weight ratio of a
/// given object. One value should always be equal to 1.0 with the
/// other value being less than, equal to, or greater than 1.0.
///
/// ## Required Conformance
///
/// ```swift
/// // The proportional volume.
/// var volume: Double { get set }
///
/// // The proportional weight.
/// var weight: Double { get set }
/// ```
///
public protocol Proportioned {
    var volume: Double { get set }
    var weight: Double { get set }
}

public extension Proportioned {
    var ratio: Ratio {
        return Ratio(volume: volume, weight: weight)
    }
}
