libGumball 0.0.1
C23-Based, libGimbal-powered UI Library
Loading...
Searching...
No Matches
gumball_vector2.h File Reference

Go to the source code of this file.

Data Structures

struct  GUM_Vector2

Macros

#define GUM_VECTOR2_TYPE

Functions

GBL_EXPORT GUM_Vector2 GUM_Vector2_add (GUM_Vector2 a, GUM_Vector2 b) GBL_NOEXCEPT
GBL_EXPORT GUM_Vector2 GUM_Vector2_subtract (GUM_Vector2 a, GUM_Vector2 b) GBL_NOEXCEPT
GBL_EXPORT GUM_Vector2 GUM_Vector2_scale (GUM_Vector2 a, float scalar) GBL_NOEXCEPT
GBL_EXPORT float GUM_Vector2_distance (GUM_Vector2 a, GUM_Vector2 b) GBL_NOEXCEPT
GBL_EXPORT float GUM_Vector2_angle (GUM_Vector2 a, GUM_Vector2 b) GBL_NOEXCEPT

Detailed Description

GUM_Vector2 is a simple 2D vector structure.

Author
2025 Agustín Bellagamba

Macro Definition Documentation

◆ GUM_VECTOR2_TYPE

#define GUM_VECTOR2_TYPE

Returns the GUM_Vector2 Type UUID.

Function Documentation

◆ GUM_Vector2_add()

GBL_EXPORT GUM_Vector2 GUM_Vector2_add ( GUM_Vector2 a,
GUM_Vector2 b )

Returns the sum of two vectors.

◆ GUM_Vector2_subtract()

GBL_EXPORT GUM_Vector2 GUM_Vector2_subtract ( GUM_Vector2 a,
GUM_Vector2 b )

Returns the difference of two vectors.

◆ GUM_Vector2_scale()

GBL_EXPORT GUM_Vector2 GUM_Vector2_scale ( GUM_Vector2 a,
float scalar )

Returns the product of a vector and a scalar.

◆ GUM_Vector2_distance()

GBL_EXPORT float GUM_Vector2_distance ( GUM_Vector2 a,
GUM_Vector2 b )

Returns the distance between two vectors.

◆ GUM_Vector2_angle()

GBL_EXPORT float GUM_Vector2_angle ( GUM_Vector2 a,
GUM_Vector2 b )

Returns the angle between two vectors.