|
Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
|
Functions | |
| vecFl_t | addVecFl2d (vecFl_t left, vecFl_t right) |
| Add two vectors and return the resulting vector. | |
| vecFl_t | subVecFl2d (vecFl_t left, vecFl_t right) |
| Subtract two vectors and return the resulting vector. | |
| vecFl_t | mulVecFl2d (vecFl_t vector, float scalar) |
| Multiply a vector by a scalar and return the result. | |
| vecFl_t | divVecFl2d (vecFl_t vector, float scalar) |
| Divide a vector by a scalar and return the result. | |
| float | dotVecFl2d (vecFl_t left, vecFl_t right) |
| Find the dot product of two vectors. | |
| vecFl_t | rotateVecFl2d (vecFl_t vector, float radians) |
| Rotate a vector by a number of degrees and return the result. | |
| float | sqMagVecFl2d (vecFl_t vector) |
| Return the squared magnitude of the given vector. The square root is not used because it is slow. | |
| float | magVecFl2d (vecFl_t vector) |
| Compute the magnitude of a vector. | |
| vecFl_t | normVecFl2d (vecFl_t vector) |
| Normalize and return a vector. | |
| vecFl_t | perpendicularVecFl2d (vecFl_t vector) |
| Return a vector perpendicular to the input. | |
Add two vectors and return the resulting vector.
| left | One vector to add |
| right | The other vector to add |
Subtract two vectors and return the resulting vector.
| left | The vector to subtract from |
| right | The other vector to subtract |
Multiply a vector by a scalar and return the result.
| vector | The vector to multiply |
| scalar | The scalar to multiply by |
Divide a vector by a scalar and return the result.
| vector | The vector to divide |
| scalar | The scalar to divide by |
Find the dot product of two vectors.
| left | One vector to dot |
| right | The other vector to dot |
Rotate a vector by a number of degrees and return the result.
| vector | The vector to rotate |
| radians | The angle to rotate clockwise by, in radians |
| float sqMagVecFl2d | ( | vecFl_t | vector | ) |
Return the squared magnitude of the given vector. The square root is not used because it is slow.
| vector | The vector to get the squared magnitude for |
| float magVecFl2d | ( | vecFl_t | vector | ) |
Compute the magnitude of a vector.
| vector | The vector to compute magnitude for |
Normalize and return a vector.
| vector | The input vector |