diff options
-rw-r--r-- | doc/classes/@GDScript.xml | 4 | ||||
-rw-r--r-- | modules/gdscript/gdscript_functions.cpp | 6 | ||||
-rw-r--r-- | modules/visual_script/visual_script_builtin_funcs.cpp | 16 |
3 files changed, 13 insertions, 13 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml index 9b73849534..9a8eaf38c4 100644 --- a/doc/classes/@GDScript.xml +++ b/doc/classes/@GDScript.xml @@ -182,7 +182,7 @@ <method name="clamp"> <return type="float"> </return> - <argument index="0" name="val" type="float"> + <argument index="0" name="value" type="float"> </argument> <argument index="1" name="min" type="float"> </argument> @@ -589,7 +589,7 @@ <method name="nearest_po2"> <return type="int"> </return> - <argument index="0" name="val" type="int"> + <argument index="0" name="value" type="int"> </argument> <description> Returns the nearest larger power of 2 for integer [code]val[/code]. diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp index f15f2197da..eceec27814 100644 --- a/modules/gdscript/gdscript_functions.cpp +++ b/modules/gdscript/gdscript_functions.cpp @@ -1483,7 +1483,7 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) { return mi; } break; case MATH_INVERSE_LERP: { - MethodInfo mi("inverse_lerp", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "value")); + MethodInfo mi("inverse_lerp", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight")); mi.return_val.type = Variant::REAL; return mi; } break; @@ -1579,12 +1579,12 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) { return mi; } break; case LOGIC_CLAMP: { - MethodInfo mi("clamp", PropertyInfo(Variant::REAL, "val"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max")); + MethodInfo mi("clamp", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max")); mi.return_val.type = Variant::REAL; return mi; } break; case LOGIC_NEAREST_PO2: { - MethodInfo mi("nearest_po2", PropertyInfo(Variant::INT, "val")); + MethodInfo mi("nearest_po2", PropertyInfo(Variant::INT, "value")); mi.return_val.type = Variant::INT; return mi; } break; diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp index 1ee0989564..7f0a42da82 100644 --- a/modules/visual_script/visual_script_builtin_funcs.cpp +++ b/modules/visual_script/visual_script_builtin_funcs.cpp @@ -257,10 +257,10 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const case MATH_ASIN: case MATH_ACOS: case MATH_ATAN: - case MATH_ATAN2: case MATH_SQRT: { - return PropertyInfo(Variant::REAL, "num"); + return PropertyInfo(Variant::REAL, "s"); } break; + case MATH_ATAN2: case MATH_FMOD: case MATH_FPOSMOD: { if (p_idx == 0) @@ -273,7 +273,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const case MATH_ROUND: case MATH_ABS: case MATH_SIGN: { - return PropertyInfo(Variant::REAL, "num"); + return PropertyInfo(Variant::REAL, "s"); } break; @@ -287,7 +287,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const case MATH_EXP: case MATH_ISNAN: case MATH_ISINF: { - return PropertyInfo(Variant::REAL, "num"); + return PropertyInfo(Variant::REAL, "s"); } break; case MATH_EASE: { if (p_idx == 0) @@ -318,7 +318,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const else if (p_idx == 1) return PropertyInfo(Variant::REAL, "to"); else - return PropertyInfo(Variant::REAL, "value"); + return PropertyInfo(Variant::REAL, "weight"); } break; case MATH_RANGE_LERP: { if (p_idx == 0) @@ -415,14 +415,14 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const } break; case LOGIC_CLAMP: { if (p_idx == 0) - return PropertyInfo(Variant::REAL, "a"); - else if (p_idx == 0) // FIXME: is it ok to test p_idx == 0 twice? + return PropertyInfo(Variant::REAL, "value"); + else if (p_idx == 1) return PropertyInfo(Variant::REAL, "min"); else return PropertyInfo(Variant::REAL, "max"); } break; case LOGIC_NEAREST_PO2: { - return PropertyInfo(Variant::INT, "num"); + return PropertyInfo(Variant::INT, "value"); } break; case OBJ_WEAKREF: { |