Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl.Vector/llms.txt

Use this file to discover all available pages before exploring further.

Prowl.Vector is a comprehensive 32-bit and 64-bit mathematics library built for the Prowl Game Engine and available as a standalone NuGet package for any .NET project. It provides the full suite of types a real-time 3D application needs — vectors, matrices, quaternions, geometry primitives, noise functions, and GJK-based collision detection — through an API intentionally modelled on the Unity Game Engine’s familiar conventions. Whether you are building a game engine, a physics sandbox, a procedural content tool, or a scientific visualiser, Prowl.Vector gives you double-precision accuracy alongside float and integer variants, all without pulling in any external runtime dependency.

Key Features

Dual Precision Types

Full suites of Double2/3/4, Float2/3/4, and Int2/3/4 vector types plus matching Double4x4, Float4x4, Double3x3, Float3x3, Double2x2, and Float2x2 matrix types. Pick the precision that fits your workload.

Quaternions

A single Quaternion struct covers Euler-angle conversions (FromEuler / EulerAngles), axis-angle construction (AxisAngle / AngleAxis), spherical interpolation (Slerp), normalized lerp (Nlerp), look-rotation, and full operator overloads for composing and applying rotations.

Geometry & Collision

The Prowl.Vector namespace ships AABB, Sphere, Plane, Ray, Cone, Triangle, Frustum, LineSegment, and Spline primitives, backed by a rich Intersection static class and a GJK collision-detection implementation (GJK.Intersects).

Procedural Mesh

GeometryData carries mesh data — vertices, normals, UVs, and indices — for wireframe and solid visualization workflows, making it easy to generate and inspect procedural geometry at runtime.

Noise Functions

The Noise static class provides Simplex noise (SNoise), Classic Perlin noise (CNoise), periodic Perlin noise (PNoise), and Cellular / Worley noise (Cellular2D, Cellular3D) in 2-D, 3-D, and 4-D variants — everything you need for procedural terrain, textures, and animation.

Random Number Generation

RNG is a fast xoshiro256** pseudo-random number generator. Use RNG.Shared for a convenient shared instance or seed your own. It produces doubles, floats, integer ranges, points on a circle or sphere, random colors, and Gaussian-distributed values.

Library Structure

Prowl.Vector is organized around two primary namespaces:
NamespaceContents
Prowl.VectorCore math types: Double2/3/4, Float2/3/4, Int2/3/4, Double4x4, Float4x4, Double3x3, Float3x3, Double2x2, Float2x2, Quaternion, Color, Color32, Rect, IntRect, RNG, and the Maths / Noise static helper classes. Also includes geometry primitives: AABB, Sphere, Plane, Ray, Cone, Triangle, Frustum, LineSegment, Spline, and the IBoundingShape interface.
Prowl.Vector.GeometryProcedural mesh and collision tools: GeometryData, the Intersection static class, and the GJK collision detector.
Add using Prowl.Vector; for all core math work and geometry primitives. Add using Prowl.Vector.Geometry; when you need procedural mesh data, intersection tests, or GJK collision detection.

Design Philosophy

Prowl.Vector was shaped by four guiding ideas:
  • Unity-inspired API. Method names, static factory patterns, and operator overloads deliberately mirror Unity’s UnityEngine math types so that developers coming from Unity face the shortest possible learning curve.
  • Double-precision by default. Engine-level transforms — world positions, camera matrices, physics integrators — accumulate floating-point error over large worlds. Double3, Double4x4, and friends use 64-bit components to minimize drift. 32-bit Float* variants are still available everywhere performance or interop with GPU APIs demands them.
  • Zero external runtime dependencies. The library targets the .NET Base Class Library only. There are no third-party runtime packages to resolve, version, or audit.
  • Broad framework compatibility. A single NuGet package targets net6.0, net7.0, net8.0, net9.0, net10.0, and netstandard2.1, covering everything from legacy .NET Standard libraries to the latest .NET releases.
Prowl.Vector is part of the Prowl Game Engine and is released under the MIT License. You are free to use, modify, and distribute it in commercial and open-source projects alike. See the LICENSE file in the repository root for the full license text.

Build docs developers (and LLMs) love