A performance-oriented 2D/3D math library for Go, optimized for graphics programming, game development, and scientific computing.
go3d is a performance-oriented 3D math library for the Go programming language. It provides essential vector, matrix, and quaternion operations with a focus on zero-allocation value types and cache-friendly data layouts, making it suitable for real-time graphics, game development, and scientific computing.
Go developers building high-performance applications requiring 3D mathematics, such as game engines, graphics programming, physics simulations, and scientific computing tools.
Developers choose go3d for its emphasis on performance through stack allocation, minimal garbage collection pressure, and OpenGL-compatible column-major matrices, offering a fluent API with both in-place and immutable operations for efficient real-time computation.
A performance oriented 2D/3D math package for Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses stack-allocated arrays for vectors and matrices, minimizing garbage collection pressure as highlighted in the README's performance tips and design philosophy.
Provides both float32 and float64 versions of all types in separate packages, catering to graphics and scientific computing needs with clear package organization under float64/.
Column-major matrix layout and right-handed coordinate systems align with OpenGL conventions, allowing direct GPU uploads without transposition as noted in the core concepts section.
Optimized layouts like 64-byte matrices that fit modern CPU cache lines, improving performance for computationally intensive tasks, as described in the features and package tables.
In-place operations return pointers for a chaining API, enabling efficient and readable code without sacrificing performance, with examples in the quick start and naming conventions.
Extensive use of pointer arguments for performance leads to more verbose code and requires careful memory management, which the README admits prioritizes performance over convenience.
Focuses solely on core math operations; lacks built-in support for advanced graphics concepts like scene graphs, animation systems, or collision detection, limiting its scope to foundational math.
Relies on github.com/chewxy/math32 for float32 math functions, adding an extra dependency and potential compatibility issues, as mentioned in the float32 math functions section.
Requires understanding of column-major order, right-handed coordinates, and pointer-based patterns, which might confuse developers accustomed to row-major or value-based APIs.