mirror of
https://github.com/Relintai/gdnative.git
synced 2025-01-26 14:29:21 +01:00
Small improvements to Vector2's api.
This commit is contained in:
parent
66330f13c1
commit
06ff8e110b
@ -57,11 +57,11 @@ pandemonium_real GDAPI pandemonium_vector2_get_y(const pandemonium_vector2 *p_se
|
||||
return self->y;
|
||||
}
|
||||
|
||||
void GDAPI pandemonium_vector2_set_axis(pandemonium_vector2 *p_self, const pandemonium_int p_axis, const pandemonium_real p_value) {
|
||||
void GDAPI pandemonium_vector2_set_axis(pandemonium_vector2 *p_self, const pandemonium_vector2_axis p_axis, const pandemonium_real p_value) {
|
||||
Vector2 *self = (Vector2 *)p_self;
|
||||
self->operator[](p_axis) = p_value;
|
||||
}
|
||||
pandemonium_real GDAPI pandemonium_vector2_get_axis(const pandemonium_vector2 *p_self, const pandemonium_int p_axis) {
|
||||
pandemonium_real GDAPI pandemonium_vector2_get_axis(const pandemonium_vector2 *p_self, const pandemonium_vector2_axis p_axis) {
|
||||
const Vector2 *self = (const Vector2 *)p_self;
|
||||
return self->operator[](p_axis);
|
||||
}
|
||||
|
@ -60,8 +60,6 @@ extern "C" {
|
||||
typedef enum {
|
||||
PANDEMONIUM_VECTOR2_AXIS_X,
|
||||
PANDEMONIUM_VECTOR2_AXIS_Y,
|
||||
|
||||
PANDEMONIUM_VECTOR2_AXIS_COUNT,
|
||||
} pandemonium_vector2_axis;
|
||||
|
||||
void GDAPI pandemonium_vector2_set_x(pandemonium_vector2 *p_self, const pandemonium_real p_x);
|
||||
@ -70,8 +68,8 @@ void GDAPI pandemonium_vector2_set_y(pandemonium_vector2 *p_self, const pandemon
|
||||
pandemonium_real GDAPI pandemonium_vector2_get_x(const pandemonium_vector2 *p_self);
|
||||
pandemonium_real GDAPI pandemonium_vector2_get_y(const pandemonium_vector2 *p_self);
|
||||
|
||||
void GDAPI pandemonium_vector2_set_axis(pandemonium_vector2 *p_self, const pandemonium_int p_axis, const pandemonium_real p_value);
|
||||
pandemonium_real GDAPI pandemonium_vector2_get_axis(const pandemonium_vector2 *p_self, const pandemonium_int p_axis);
|
||||
void GDAPI pandemonium_vector2_set_axis(pandemonium_vector2 *p_self, const pandemonium_vector2_axis p_axis, const pandemonium_real p_value);
|
||||
pandemonium_real GDAPI pandemonium_vector2_get_axis(const pandemonium_vector2 *p_self, const pandemonium_vector2_axis p_axis);
|
||||
|
||||
void GDAPI pandemonium_vector2_set_all(pandemonium_vector2 *p_self, const pandemonium_real p_value);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user