Skip to content

Releases: ken0nek/SwiftMeasurement

2.0.0

06 May 06:58
Compare
Choose a tag to compare

SwiftMeasurement 2.0.0

New Features

  • Dimensional Analysis System: Perform type-safe calculations between different unit types
  • Smart Math Operations: speed × time = distance, length × length = area, etc.
  • Automatic Unit Conversion: Results automatically convert to appropriate dimensions
  • 22 Foundation Units Supported: All Foundation unit types with correct dimensional relationships

Examples

// Speed × Duration = Length
let distance = 60.0.kilometersPerHour * 2.5.hours
let kilometers = distance.asLength?.converted(to: .kilometers)  // 150.0 km

// Length × Length = Area
let area = 10.0.meters * 5.0.meters
let squareMeters = area.asArea?.converted(to: .squareMeters)  // 50.0 m²

Installation

Update your SPM dependency to use version 2.0.0:

.package(url: "https://github.com/ken0nek/SwiftMeasurement.git", from: "2.0.0")

1.2.0

06 May 06:58
Compare
Choose a tag to compare
  • Literal syntax support
  • Reorganize tests

1.1.0

02 May 06:32
Compare
Choose a tag to compare
  • Added support for initializing Measurement with Int and Float values
  • Added comprehensive unit tests for all measurement units

1.0.0

08 Apr 05:31
8780405
Compare
Choose a tag to compare
  • Introduce MeasurementConvertible to support Int and Float as well

0.5.0

07 Apr 22:04
d12feb1
Compare
Choose a tag to compare
  • Swift 5.10 support
  • Bumped minimum version requirements
  • visionOS support
  • SwiftTesting integration
  • Removal of Xcode project files

0.4.1

08 Nov 20:24
Compare
Choose a tag to compare
  • watchOS and tvOS support

0.4.0

08 Nov 19:25
Compare
Choose a tag to compare
  • Update Swift version
  • Add badges in README
  • Set watchOS and tvOS availability (Will try in the next release)

iOS 14 and 15 compatibility

01 Jul 04:35
Compare
Choose a tag to compare
  • Swift Package Manager changes
  • Update Swift version (Not included. Version 0.4 uses Swift 5+)
  • Set macOS availability

iOS 13 compatible

26 Oct 05:00
d8dcb69
Compare
Choose a tag to compare
  • Add new units in UnitDuration
  • Add a new unit in UnitFrequency
  • Add a new dimension: UnitInformationStorage