diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-09-20 06:33:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-20 06:33:55 +0200 |
commit | 82f5130cad04c2a959a87ea0bca63e82454fa3cf (patch) | |
tree | bd234fb662affe8d7710a1bc895baaf7eb8be846 | |
parent | 52431741d4f8d9786d2a8d0e6cb137d49a550310 (diff) | |
parent | c21412fa7e098ac31b5d667d4d9f8eee3f12a2cd (diff) |
Merge pull request #6552 from Hinsbart/vec2_clamped
Expose Vector2::clamped() to scripts
-rw-r--r-- | core/variant_call.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 8473fdcd19..5f052bce8e 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -346,6 +346,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_LOCALMEM0R(Vector2,angle); // VCALL_LOCALMEM1R(Vector2,cross); VCALL_LOCALMEM0R(Vector2,abs); + VCALL_LOCALMEM1R(Vector2,clamped); VCALL_LOCALMEM0R(Rect2,get_area); VCALL_LOCALMEM1R(Rect2,intersects); @@ -1457,6 +1458,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC1(VECTOR2,VECTOR2,Vector2,reflect,VECTOR2,"vec",varray()); //ADDFUNC1(VECTOR2,REAL,Vector2,cross,VECTOR2,"with",varray()); ADDFUNC0(VECTOR2,VECTOR2,Vector2,abs,varray()); + ADDFUNC1(VECTOR2,VECTOR2,Vector2,clamped,REAL,"length",varray()); ADDFUNC0(RECT2,REAL,Rect2,get_area,varray()); ADDFUNC1(RECT2,BOOL,Rect2,intersects,RECT2,"b",varray()); |