Merge pull request #2 from martin-key/master Updates for Swift 5 and Updates for SPM 5.2
Merge pull request #2 from martin-key/master
Updates for Swift 5 and Updates for SPM 5.2
Using Swift 4. Please be aware.
let baseVector = Vector3(1, 6, 5) let otherVector = Vector3(7, 1, 3) baseVector.adding(otherVector) //=> Vector3(8, 7, 8) baseVector.magnitude //=> 7.874
let baseVector = Vector3(0, 1, 0) let quat = Quaternion(axis: .xAxis, angle: Degrees(90)) let eulerAngles = EulerAngles(pitch: 90.degrees, yaw: 0.degrees, roll: 0.degrees, system: .xyz) baseVector.rotated(by: quat) //=> Vector3(0, 0, 1) baseVector.rotated(by: eulerAngles) // -> Vector3(0, 0, 1)
Hamilton is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Hamilton"
Patrick Metcalfe, git@patrickmetcalfe.com
Hamilton is available under the MIT license. See the LICENSE file for more info.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Hamilton
Requirements
Using Swift 4. Please be aware.
Basic Usage
Basic Operations
Rotations
Installation
Hamilton is available through CocoaPods. To install it, simply add the following line to your Podfile:
Author
Patrick Metcalfe, git@patrickmetcalfe.com
License
Hamilton is available under the MIT license. See the LICENSE file for more info.