diff options
author | Kelly Thomas <kelly.thomas@hotmail.com.au> | 2018-10-07 02:13:41 +0800 |
---|---|---|
committer | Kelly Thomas <kelly.thomas@hotmail.com.au> | 2018-10-07 21:33:18 +0800 |
commit | 215db9ff71c2c2fb3fe670fb8ea9109fca5b5a6a (patch) | |
tree | a666274f0c457b253cbea06e41f0b13842089ac4 | |
parent | a41cf404a9013db6aed56d6ed9b051c2a4948bff (diff) |
add ONE constants to Vector2 and Vector3
-rw-r--r-- | core/variant_call.cpp | 2 | ||||
-rw-r--r-- | doc/classes/Vector2.xml | 5 | ||||
-rw-r--r-- | doc/classes/Vector3.xml | 5 |
3 files changed, 10 insertions, 2 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp index f7fa2ebc70..8693a584f2 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -1895,6 +1895,7 @@ void register_variant_methods() { _VariantCall::add_constant(Variant::VECTOR3, "AXIS_Z", Vector3::AXIS_Z); _VariantCall::add_variant_constant(Variant::VECTOR3, "ZERO", Vector3(0, 0, 0)); + _VariantCall::add_variant_constant(Variant::VECTOR3, "ONE", Vector3(1, 1, 1)); _VariantCall::add_variant_constant(Variant::VECTOR3, "INF", Vector3(Math_INF, Math_INF, Math_INF)); _VariantCall::add_variant_constant(Variant::VECTOR3, "LEFT", Vector3(-1, 0, 0)); _VariantCall::add_variant_constant(Variant::VECTOR3, "RIGHT", Vector3(1, 0, 0)); @@ -1904,6 +1905,7 @@ void register_variant_methods() { _VariantCall::add_variant_constant(Variant::VECTOR3, "BACK", Vector3(0, 0, 1)); _VariantCall::add_variant_constant(Variant::VECTOR2, "ZERO", Vector2(0, 0)); + _VariantCall::add_variant_constant(Variant::VECTOR2, "ONE", Vector2(1, 1)); _VariantCall::add_variant_constant(Variant::VECTOR2, "INF", Vector2(Math_INF, Math_INF)); _VariantCall::add_variant_constant(Variant::VECTOR2, "LEFT", Vector2(-1, 0)); _VariantCall::add_variant_constant(Variant::VECTOR2, "RIGHT", Vector2(1, 0)); diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 7e03e7f0fe..c323cf6992 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -267,7 +267,10 @@ </members> <constants> <constant name="ZERO" value="Vector2( 0, 0 )"> - Null vector. + Zero vector. + </constant> + <constant name="ONE" value="Vector2( 1, 1 )"> + One vector. </constant> <constant name="INF" value="Vector2( inf, inf )"> Infinite vector. diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 4211c34d8e..8c4e08778d 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -280,7 +280,10 @@ Enumerated value for the Z axis. </constant> <constant name="ZERO" value="Vector3( 0, 0, 0 )"> - Null vector. + Zero vector. + </constant> + <constant name="ONE" value="Vector3( 1, 1, 1 )"> + One vector. </constant> <constant name="INF" value="Vector3( inf, inf, inf )"> Infinite vector. |