A Swift library implementing 2D/3D vector and matrix functions for games and graphics, with a Swift-native API.
VectorMath is a Swift library that implements common 2D and 3D vector and matrix functions, essential for game development and vector-based graphics on macOS and iOS. It provides a Swift-native API that replaces or supplements lower-level C-based graphics libraries, offering a more elegant and type-safe interface. The library includes support for vectors, matrices, quaternions, and interoperability with Apple's graphics frameworks.
Swift developers building games, graphics applications, or simulations on iOS and macOS who need performant and expressive vector/matrix math operations. It's particularly useful for those transitioning from C/GLKit or seeking a native Swift solution.
Developers choose VectorMath for its clean, Swift-idiomatic API that leverages operator overloading and structs, making mathematical code more readable and maintainable. It serves as a direct, standalone replacement for GLKit's vector math in Swift projects, with optional extensions for seamless integration with SceneKit and Quartz.
A Swift library for Mac and iOS that implements common 2D and 3D vector and matrix functions, useful for games or vector-based graphics
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages Swift features like operator overloading and struct methods, providing a clean and expressive interface that feels natural in Swift code, as highlighted in the README's emphasis on elegance over C-based APIs.
Includes Vector2, Vector3, Vector4, Matrix3, Matrix4, and Quaternion with essential operations, covering common needs for 2D and 3D graphics without extra dependencies.
Offers optional compatibility extensions for SceneKit and Quartz, allowing seamless use with Apple's graphics frameworks like UIKit and SpriteKit, as detailed in the installation section.
Relies only on Foundation, making it lightweight and easy to integrate into any Swift project on iOS or macOS, reducing setup complexity and potential conflicts.
The README explicitly states it 'has not been heavily optimized yet' and lacks hardware acceleration using the Accelerate framework, which can limit performance in real-time or high-demand applications.
Designed solely for iOS and macOS, with no support for other platforms, making it unsuitable for cross-platform projects or developers targeting a broader ecosystem.
Focuses on core operations; developers needing specialized functions like geometric algorithms or advanced simulations might find it lacking compared to more extensive libraries.
VectorMath is an open-source alternative to the following products: