Source

pygame / doc / capi / math.rst

Full commit

pygame2.math

The :mod:`pygame2.math` C API contains various objects and functions for math and vector operations.

Import

Include headers:

pygame2/pgmath.h

Macros

Functions

PyVector

The PyVector object is a generic vector implementation, which can deal with any dimension size. Specialized (and in some terms faster) implementations for 2 and 3 dimensions can be found in the :ctype:`PyVector2` and :ctype:`PyVector3` implementations.

Members

Functions

PyVector2

A specialized :ctype:`PyVector` class limited to two dimensions.

Members

Functions

PyVector3

A specialized :ctype:`PyVector` class limited to three dimensions.

Members

Functions