monogame-math

Installation
SKILL.md

MonoGame Math Implementation Guide

This skill covers math types and patterns in MonoGame. For bounding volume details, see references/math.md.

Vectors

Vector2, Vector3, and Vector4 are value types (structs). Do not allocate them with new inside Update() or Draw() — mutate fields instead.

// BAD — allocates every frame:
_velocity = new Vector2(_velocity.X + acceleration, _velocity.Y);

// GOOD — mutate in place:
_velocity.X += acceleration;

Common Vector2 operations

Installs
15
GitHub Stars
2
First Seen
May 20, 2026
monogame-math — alca259/monogame-skills