From d57f416e47f54241dea0892f3b064afbe1b8a899 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 May 2016 21:36:42 +1000 Subject: [PATCH] Fix incorrect FLT_MIN use --- source/blender/blenkernel/intern/DerivedMesh.c | 2 +- source/blender/makesrna/intern/rna_tracking.c | 4 ++-- source/blender/python/intern/bpy_rna_anim.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 1ec714ea0bb..1bfc3d90730 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -4000,7 +4000,7 @@ void DM_init_origspace(DerivedMesh *dm) float p_nor[3], co[3]; float mat[3][3]; - float min[2] = {FLT_MAX, FLT_MAX}, max[2] = {FLT_MIN, FLT_MIN}; + float min[2] = {FLT_MAX, FLT_MAX}, max[2] = {-FLT_MAX, -FLT_MAX}; float translate[2], scale[2]; BKE_mesh_calc_poly_normal(mp, l, mv, p_nor); diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index a9901fd3a50..2564bdb800f 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -1777,8 +1777,8 @@ static void rna_def_trackingReconstructedCameras(BlenderRNA *brna) RNA_def_function_flag(func, FUNC_USE_SELF_ID); RNA_def_function_ui_description(func, "Return interpolated camera matrix for a given frame"); RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to find camera for", MINFRAME, MAXFRAME); - parm = RNA_def_float_matrix(func, "matrix", 4, 4, NULL, FLT_MIN, FLT_MAX, "Matrix", - "Interpolated camera matrix for a given frame", FLT_MIN, FLT_MAX); + parm = RNA_def_float_matrix(func, "matrix", 4, 4, NULL, -FLT_MAX, FLT_MAX, "Matrix", + "Interpolated camera matrix for a given frame", -FLT_MAX, FLT_MAX); RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */ RNA_def_function_output(func, parm); } diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c index 2ec73c3c9b7..92931eb8090 100644 --- a/source/blender/python/intern/bpy_rna_anim.c +++ b/source/blender/python/intern/bpy_rna_anim.c @@ -27,7 +27,7 @@ */ #include -#include /* FLT_MIN/MAX */ +#include /* FLT_MAX */ #include "MEM_guardedalloc.h"