Releases: koher/CGPointVector
Releases · koher/CGPointVector
Avoid overflow and underflow of `length` and `distance`
- Replace
x * x + y * y
withhypot(x, y)
(9feb2ea)- This prevents overflow and underflow during calculating
length
anddistance
. It makes it possible to pass the following tests.
- This prevents overflow and underflow during calculating
XCTAssertEqual(CGPoint(x: .greatestFiniteMagnitude, y: 0.0).length, .greatestFiniteMagnitude)
XCTAssertEqual(CGPoint(x: 0.0, y: .leastNonzeroMagnitude).length, .leastNonzeroMagnitude)
Support only Swift 5.x
Swift 4.2 and API improvements
- Swift 4.2 and Xcode 10
- Renamed APIs
cos(angleFrom:)
tocos(from:)
nealyEqual
toisNealyEqual
- 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
andCGVector
same asCGPoint
- New operators
- Remove
CGAffineTransform.inverse
Fix `cos/angle(from:)` for zero vectors
- Swift 4.2 and Xcode 10
- Renamed APIs
cos(angleFrom:)
tocos(from:)
nealyEqual
toisNealyEqual
- 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
andCGVector
same asCGPoint
- New operators
- Remove
CGAffineTransform.inverse
Changes from 0.3.0-beta.2
- Fix
cos/angle(from:)
for zero vectors
Swift 4.2 and Xcode 10
- Swift 4.2 and Xcode 10
- Renamed APIs
cos(angleFrom:)
tocos(from:)
nealyEqual
toisNealyEqual
- Add lacked APIs
- Full vector APIs for
CGSize
same asCGPoint
- New operators
*(CGPoint, CGPoint) -> CGPoint
,/(CGPoint, CGPoint) -> CGPoint
*=(inout CGPoint, CGPoint)
,/=(inout CGPoint, CGPoint)
- Operators for mixed types
- Full vector APIs for
- Remove
CGAffineTransform.inverse
- Extensions for
CGVector
Refactored APIs and `CGVector` supports
- Renamed APIs
*
to⊗
cos(angleFrom:)
tocos(from:)
nealyEqual
toisNealyEqual
- Add lacked APIs
- Full vector APIs for
CGSize
same asCGPoint
- New operators
*(CGPoint, CGPoint) -> CGPoint
,/(CGPoint, CGPoint) -> CGPoint
*=(inout CGPoint, CGPoint)
,/=(inout CGPoint, CGPoint)
- Operators for mixed types
- Full vector APIs for
- Remove
CGAffineTransform.inverse
- Extensions for
CGVector
Update for Swift 4
- Support Swift 4
- Support swift-tools-version:4.0 for Swift Package Manager
- Support Carthage (iOS, macOS, tvOS, watchOS)