SIMDTools
provides utility functions and extensions for working with SIMD matrices and vectors in Swift.
The simd-tools
package includes:
Angle
struct for representing angles.- Extensions for
float3x3
andfloat4x4
to perform various matrix transformations. SIMD2
,SIMD3
andSIMD4
components permutations.- Utility functions such as
clamp
,saturate
, andinterpolate
.
Please see the package's documentation for more detailed usage instructions.
To use the SIMDTools package, first add it as a dependency:
let package = Package(
// name, platforms, products, etc.
dependencies: [
// other dependencies
.package(url: "https://github.com/computer-graphics-tools/simd-tools", from: "0.0.1"),
],
targets: [
// targets
]
)
Swift 5.9 is required in order to use the package.
-
Learn how to use SIMD matrices to calculate affine transform for rotating SwiftUI views. Get started with SIMDTools by building the demo app RotateImage.
SIMDTools is licensed under MIT license.