Some more typo fixes for "threshold"

Looks like @reduz really does not like that word.
This commit is contained in:
Rémi Verschelde 2017-07-15 12:01:46 +02:00
parent b1ca62af52
commit e64b82ebfc
4 changed files with 14 additions and 14 deletions

View file

@ -149,7 +149,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In
Vector<Vector2> poly = node->get_polygon();
//first check if a point is to be added (segment split)
real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8);
real_t grab_threshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8);
switch(mode) {
@ -171,7 +171,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In
} else {
if (wip.size()>1 && p_camera->unproject_position(gt.xform(Vector3(wip[0].x,wip[0].y,depth))).distance_to(gpoint)<grab_treshold) {
if (wip.size()>1 && p_camera->unproject_position(gt.xform(Vector3(wip[0].x,wip[0].y,depth))).distance_to(gpoint)<grab_threshold) {
//wip closed
_wip_close();
@ -230,7 +230,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In
continue; //not valid to reuse point
real_t d = cp.distance_to(gpoint);
if (d<closest_dist && d<grab_treshold) {
if (d<closest_dist && d<grab_threshold) {
closest_dist=d;
closest_pos=cp;
closest_idx=i;
@ -261,7 +261,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In
Vector2 cp = p_camera->unproject_position(gt.xform(Vector3(poly[i].x,poly[i].y,depth)));
real_t d = cp.distance_to(gpoint);
if (d<closest_dist && d<grab_treshold) {
if (d<closest_dist && d<grab_threshold) {
closest_dist=d;
closest_pos=cp;
closest_idx=i;
@ -309,7 +309,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In
Vector2 cp = p_camera->unproject_position(gt.xform(Vector3(poly[i].x,poly[i].y,depth)));
real_t d = cp.distance_to(gpoint);
if (d<closest_dist && d<grab_treshold) {
if (d<closest_dist && d<grab_threshold) {
closest_dist=d;
closest_pos=cp;
closest_idx=i;

View file

@ -248,7 +248,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
edited_point=1;
return true;
} else {
if (wip.size()>1 && xform.xform(wip[0]).distance_to(gpoint)<grab_treshold) {
if (wip.size()>1 && xform.xform(wip[0]).distance_to(gpoint)<grab_threshold) {
//wip closed
_wip_close();
@ -307,7 +307,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
continue; //not valid to reuse point
real_t d = cp.distance_to(gpoint);
if (d<closest_dist && d<grab_treshold) {
if (d<closest_dist && d<grab_threshold) {
closest_dist=d;
closest_pos=cp;
closest_idx=i;
@ -343,7 +343,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
Vector2 cp =xform.xform(poly[i]);
real_t d = cp.distance_to(gpoint);
if (d<closest_dist && d<grab_treshold) {
if (d<closest_dist && d<grab_threshold) {
closest_dist=d;
closest_pos=cp;
closest_idx=i;
@ -396,7 +396,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
Vector2 cp =xform.xform(poly[i]);
real_t d = cp.distance_to(gpoint);
if (d<closest_dist && d<grab_treshold) {
if (d<closest_dist && d<grab_threshold) {
closest_dist=d;
closest_pos=cp;
closest_idx=i;

View file

@ -944,7 +944,7 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
filters[idx] = Ref<InputEvent>();
filters[idx].type = Ref<InputEvent>::Type(int(p_value));
if (filters[idx].type == Ref<InputEvent>::JOYPAD_MOTION) {
filters[idx].joy_motion.axis_value = 0.5; //for treshold
filters[idx].joy_motion.axis_value = 0.5; //for threshold
} else if (filters[idx].type == Ref<InputEvent>::KEY) {
filters[idx]->is_pressed() = true; //put these as true to make it more user friendly
} else if (filters[idx].type == Ref<InputEvent>::MOUSE_BUTTON) {
@ -1071,7 +1071,7 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
filters[idx].joy_motion.axis = int(p_value) << 1 | filters[idx].joy_motion.axis;
} else if (what == "mode") {
filters[idx].joy_motion.axis |= int(p_value);
} else if (what == "treshold") {
} else if (what == "threshold") {
filters[idx].joy_motion.axis_value = p_value;
} else {
return false;
@ -1281,7 +1281,7 @@ bool VisualScriptInputFilter::_get(const StringName &p_name, Variant &r_ret) con
r_ret = filters[idx].joy_motion.axis >> 1;
} else if (what == "mode") {
r_ret = filters[idx].joy_motion.axis & 1;
} else if (what == "treshold") {
} else if (what == "threshold") {
r_ret = filters[idx].joy_motion.axis_value;
} else {
return false;
@ -1434,7 +1434,7 @@ void VisualScriptInputFilter::_get_property_list(List<PropertyInfo> *p_list) con
p_list->push_back(PropertyInfo(Variant::INT, base + "axis_index"));
p_list->push_back(PropertyInfo(Variant::INT, base + "mode", PROPERTY_HINT_ENUM, "Min,Max"));
p_list->push_back(PropertyInfo(Variant::REAL, base + "treshold", PROPERTY_HINT_RANGE, "0,1,0.01"));
p_list->push_back(PropertyInfo(Variant::REAL, base + "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"));
} break;
case Ref<InputEvent>::JOYPAD_BUTTON: {
p_list->push_back(PropertyInfo(Variant::INT, base + "button_index"));

View file

@ -1186,7 +1186,7 @@ Space2DSW::Space2DSW() {
contact_max_allowed_penetration = 0.3;
constraint_bias = 0.2;
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threashold_linear", 2.0);
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_linear", 2.0);
body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_angular", (8.0 / 180.0 * Math_PI));
body_time_to_sleep = GLOBAL_DEF("physics/2d/time_before_sleep", 0.5);