UnitEnergy

public extension UnitEnergy
  • Energy in MegaJoule (MJ)

    Declaration

    Swift

    class var megajoule: UnitEnergy { get }
  • Energy in Watt Hours (Wh)

    Declaration

    Swift

    class var wattHours: UnitEnergy { get }
  • Energy in Electron Volts (ev)

    Declaration

    Swift

    class var electronVolt: UnitEnergy { get }
  • btu

    Energy in British Thermal Units (BTU)

    Declaration

    Swift

    class var btu: UnitEnergy { get }
  • Energy in Therms (thm)

    Declaration

    Swift

    class var therm: UnitEnergy { get }
  • Calculates the Energy Burned using stanard calculation from Heartrate, age, gender

    Declaration

    Swift

    final class func energyBurned(weight: Measurement<UnitMass>, gender: UnitGender, heartRate: UInt8, ageInYears age: Int) -> Measurement<UnitEnergy>

    Parameters

    weight

    Weight of Person

    gender

    Gender - UnitGender.female or UnitGender.male

    heartRate

    Heart Rate

    age

    Age of Person in years

    Return Value

    Energy Measurement

  • Calculates the Basal Metabolic Rate (BMR) using the Mifflin St. Jeor Equation

    Declaration

    Swift

    final class func bmrUsingMifflin(height: Measurement<UnitLength>, weight: Measurement<UnitMass>, gender: UnitGender, ageInYears age: Int) -> Double

    Parameters

    height

    Height

    weight

    Weight

    gender

    Gender - UnitGender.female or UnitGender.male

    age

    Age in Years

    Return Value

    The Basal metabolic rate (BMR)