mirror of
https://github.com/Relintai/gdnative.git
synced 2024-11-10 00:52:11 +01:00
Added missing methods to Vector2i.
This commit is contained in:
parent
8473aa34a0
commit
a2018f3225
@ -195,6 +195,21 @@ pandemonium_vector2i GDAPI pandemonium_vector2i_abs(const pandemonium_vector2i *
|
||||
*((Vector2i *)&dest) = self->abs();
|
||||
return dest;
|
||||
}
|
||||
pandemonium_vector2i GDAPI pandemonium_vector2i_clamp(const pandemonium_vector2i *p_self, const pandemonium_vector2i *p_min, const pandemonium_vector2i *p_max) {
|
||||
pandemonium_vector2i dest;
|
||||
const Vector2i *self = (const Vector2i *)p_self;
|
||||
const Vector2i *min = (const Vector2i *)p_min;
|
||||
const Vector2i *max = (const Vector2i *)p_max;
|
||||
*((Vector2i *)&dest) = self->clamp(*min, *max);
|
||||
return dest;
|
||||
}
|
||||
|
||||
pandemonium_vector2 GDAPI pandemonium_vector2i_to_vector2(const pandemonium_vector2i *p_self) {
|
||||
pandemonium_vector2 dest;
|
||||
const Vector2i *self = (const Vector2i *)p_self;
|
||||
*((Vector2 *)&dest) = self->to_vector2();
|
||||
return dest;
|
||||
}
|
||||
|
||||
pandemonium_vector2i GDAPI pandemonium_vector2i_sign(const pandemonium_vector2i *p_self) {
|
||||
pandemonium_vector2i dest;
|
||||
|
@ -104,9 +104,9 @@ pandemonium_int GDAPI pandemonium_vector2i_length_squared(const pandemonium_vect
|
||||
pandemonium_real GDAPI pandemonium_vector2i_aspect(const pandemonium_vector2i *p_self);
|
||||
pandemonium_vector2i GDAPI pandemonium_vector2i_sign(const pandemonium_vector2i *p_self);
|
||||
pandemonium_vector2i GDAPI pandemonium_vector2i_abs(const pandemonium_vector2i *p_self);
|
||||
//Vector2i clamp(const Vector2i &p_min, const Vector2i &p_max) const;
|
||||
pandemonium_vector2i GDAPI pandemonium_vector2i_clamp(const pandemonium_vector2i *p_self, const pandemonium_vector2i *p_min, const pandemonium_vector2i *p_max);
|
||||
|
||||
//Vector2 to_vector2() const { return Vector2(x, y); }
|
||||
pandemonium_vector2 GDAPI pandemonium_vector2i_to_vector2(const pandemonium_vector2i *p_self);
|
||||
|
||||
pandemonium_string GDAPI pandemonium_vector2i_as_string(const pandemonium_vector2i *p_self);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user