use -FLT_MAX where FLT_MIN was misused
This commit is contained in:
@@ -646,7 +646,7 @@ void MASK_OT_add_vertex(wmOperatorType *ot)
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* properties */
|
||||
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MIN, FLT_MAX,
|
||||
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
|
||||
"Location", "Location of vertex in normalized space", -1.0f, 1.0f);
|
||||
}
|
||||
|
||||
@@ -720,6 +720,6 @@ void MASK_OT_add_feather_vertex(wmOperatorType *ot)
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* properties */
|
||||
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MIN, FLT_MAX,
|
||||
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
|
||||
"Location", "Location of vertex in normalized space", -1.0f, 1.0f);
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ void MASK_OT_select(wmOperatorType *ot)
|
||||
/* properties */
|
||||
WM_operator_properties_mouse_select(ot);
|
||||
|
||||
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MIN, FLT_MAX,
|
||||
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
|
||||
"Location", "Location of vertex in normalized space", -1.0f, 1.0f);
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ static void GRAPH_OT_cursor_set(wmOperatorType *ot)
|
||||
|
||||
/* rna */
|
||||
RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);
|
||||
RNA_def_float(ot->srna, "value", 0, FLT_MIN, FLT_MAX, "Value", "", -100.0f, 100.0f);
|
||||
RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Value", "", -100.0f, 100.0f);
|
||||
}
|
||||
|
||||
/* ************************** registration - operator types **********************************/
|
||||
|
||||
@@ -1031,7 +1031,7 @@ void RNA_property_float_ui_range(PointerRNA *ptr, PropertyRNA *prop, float *soft
|
||||
IDProperty *item;
|
||||
|
||||
item = IDP_GetPropertyTypeFromGroup(idp_ui, "soft_min", IDP_DOUBLE);
|
||||
*softmin = item ? (float)IDP_Double(item) : FLT_MIN;
|
||||
*softmin = item ? (float)IDP_Double(item) : -FLT_MAX;
|
||||
|
||||
item = IDP_GetPropertyTypeFromGroup(idp_ui, "soft_max", IDP_DOUBLE);
|
||||
*softmax = item ? (float)IDP_Double(item) : FLT_MAX;
|
||||
|
||||
@@ -435,7 +435,7 @@ static int mathutils_rna_vector_set(BaseMathObject *bmo, int subtype)
|
||||
|
||||
RNA_property_float_range(&self->ptr, self->prop, &min, &max);
|
||||
|
||||
if (min != FLT_MIN || max != FLT_MAX) {
|
||||
if (min != -FLT_MAX || max != FLT_MAX) {
|
||||
int i, len = RNA_property_array_length(&self->ptr, self->prop);
|
||||
for (i = 0; i < len; i++) {
|
||||
CLAMP(bmo->data[i], min, max);
|
||||
|
||||
Reference in New Issue
Block a user