Skip to content

Releases: koher/CGPointVector

Avoid overflow and underflow of `length` and `distance`

04 May 16:26
f6bed1d
Compare
Choose a tag to compare
  • Replace x * x + y * y with hypot(x, y) (9feb2ea)
    • This prevents overflow and underflow during calculating length and distance. It makes it possible to pass the following tests.
XCTAssertEqual(CGPoint(x: .greatestFiniteMagnitude, y: 0.0).length, .greatestFiniteMagnitude)
XCTAssertEqual(CGPoint(x: 0.0, y: .leastNonzeroMagnitude).length, .leastNonzeroMagnitude)

Support only Swift 5.x

03 May 07:27
910ed2e
Compare
Choose a tag to compare
  • Quit supporting Carthage
    • Xcode today supports SwiftPM.
  • Remove CGAffineTransform * CGPoint (542c7ed)
  • Remove CGSize * CGAffineTransform (653bd45)
  • Support only Swift 5.0 and later

Swift 4.2 and API improvements

30 Oct 01:26
5b6df07
Compare
Choose a tag to compare
  • Swift 4.2 and Xcode 10
  • Renamed APIs
    • cos(angleFrom:) to cos(from:)
    • nealyEqual to isNealyEqual
  • Support CGVector
  • Add missing APIs
    • New operators
      • *(CGPoint, CGPoint) -> CGPoint, /(CGPoint, CGPoint) -> CGPoint
      • *=(inout CGPoint, CGPoint), /=(inout CGPoint, CGPoint)
      • Operators for mixed types
    • Full vector APIs for CGSize and CGVector same as CGPoint
  • Remove CGAffineTransform.inverse

Fix `cos/angle(from:)` for zero vectors

12 Oct 02:07
Compare
Choose a tag to compare
Pre-release
  • Swift 4.2 and Xcode 10
  • Renamed APIs
    • cos(angleFrom:) to cos(from:)
    • nealyEqual to isNealyEqual
  • Support CGVector
  • Add missing APIs
    • New operators
      • *(CGPoint, CGPoint) -> CGPoint, /(CGPoint, CGPoint) -> CGPoint
      • *=(inout CGPoint, CGPoint), /=(inout CGPoint, CGPoint)
      • Operators for mixed types
    • Full vector APIs for CGSize and CGVector same as CGPoint
  • Remove CGAffineTransform.inverse

Changes from 0.3.0-beta.2

  • Fix cos/angle(from:) for zero vectors

Swift 4.2 and Xcode 10

28 Sep 03:20
Compare
Choose a tag to compare
Pre-release
  • Swift 4.2 and Xcode 10
  • Renamed APIs
    • cos(angleFrom:) to cos(from:)
    • nealyEqual to isNealyEqual
  • Add lacked APIs
    • Full vector APIs for CGSize same as CGPoint
    • New operators
      • *(CGPoint, CGPoint) -> CGPoint, /(CGPoint, CGPoint) -> CGPoint
      • *=(inout CGPoint, CGPoint), /=(inout CGPoint, CGPoint)
      • Operators for mixed types
  • Remove CGAffineTransform.inverse
  • Extensions for CGVector

Refactored APIs and `CGVector` supports

21 Jun 05:11
Compare
Choose a tag to compare
Pre-release
  • Renamed APIs
    • * to
    • cos(angleFrom:) to cos(from:)
    • nealyEqual to isNealyEqual
  • Add lacked APIs
    • Full vector APIs for CGSize same as CGPoint
    • New operators
      • *(CGPoint, CGPoint) -> CGPoint, /(CGPoint, CGPoint) -> CGPoint
      • *=(inout CGPoint, CGPoint), /=(inout CGPoint, CGPoint)
      • Operators for mixed types
  • Remove CGAffineTransform.inverse
  • Extensions for CGVector

Update for Swift 4

10 Nov 05:11
ee9a328
Compare
Choose a tag to compare
  • Support Swift 4
  • Support swift-tools-version:4.0 for Swift Package Manager
  • Support Carthage (iOS, macOS, tvOS, watchOS)