diff options
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_editor.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 14 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_select.c | 6 |
5 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 8e13bc61ee8..96eb6002840 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -732,7 +732,7 @@ static float get_shortest_pattern_side(MovieTrackingMarker *marker) cur_len = len_v2v2(marker->pattern_corners[i], marker->pattern_corners[next]); - len = MIN2(cur_len, len); + len = minf(cur_len, len); } return len; @@ -804,11 +804,11 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo dy = 6.0f / height / sc->zoom; side = get_shortest_pattern_side(marker); - patdx = MIN2(dx * 2.0f / 3.0f, side / 6.0f); - patdy = MIN2(dy * 2.0f / 3.0f, side * width / height / 6.0f); + patdx = minf(dx * 2.0f / 3.0f, side / 6.0f); + patdy = minf(dy * 2.0f / 3.0f, side * width / height / 6.0f); - searchdx = MIN2(dx, (marker->search_max[0] - marker->search_min[0]) / 6.0f); - searchdy = MIN2(dy, (marker->search_max[1] - marker->search_min[1]) / 6.0f); + searchdx = minf(dx, (marker->search_max[0] - marker->search_min[0]) / 6.0f); + searchdy = minf(dy, (marker->search_max[1] - marker->search_min[1]) / 6.0f); px[0] = 1.0f / sc->zoom / width / sc->scale; px[1] = 1.0f / sc->zoom / height / sc->scale; diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 54ee691b63b..349303afbf2 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -351,7 +351,7 @@ int ED_clip_view_selection(const bContext *C, ARegion *ar, int fit) zoomx = (float)width / w / aspx; zoomy = (float)height / h / aspy; - newzoom = 1.0f / power_of_2(1.0f / MIN2(zoomx, zoomy)); + newzoom = 1.0f / power_of_2(1.0f / minf(zoomx, zoomy)); if (fit || sc->zoom > newzoom) sc->zoom = newzoom; diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index f7222dae75f..20d47063cd4 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -735,7 +735,7 @@ static int view_all_exec(bContext *C, wmOperator *op) zoomx = (float) width / (w + 2 * margin); zoomy = (float) height / (h + 2 * margin); - sclip_zoom_set(C, MIN2(zoomx, zoomy), NULL); + sclip_zoom_set(C, minf(zoomx, zoomy), NULL); } else { if ((w >= width || h >= height) && (width > 0 && height > 0)) { @@ -743,7 +743,7 @@ static int view_all_exec(bContext *C, wmOperator *op) zoomy = (float) height / h; /* find the zoom value that will fit the image in the image space */ - sclip_zoom_set(C, 1.0f / power_of_2(1.0f / MIN2(zoomx, zoomy)), NULL); + sclip_zoom_set(C, 1.0f / power_of_2(1.0f / minf(zoomx, zoomy)), NULL); } else sclip_zoom_set(C, 1.0f, NULL); diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 77c4b527a11..153287eecdd 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -373,8 +373,8 @@ static int mouse_on_slide_zone(SpaceClip *sc, MovieTrackingMarker *marker, dx = size / width / sc->zoom; dy = size / height / sc->zoom; - dx = MIN2(dx, (max[0] - min[0]) / 6.0f); - dy = MIN2(dy, (max[1] - min[1]) / 6.0f); + dx = minf(dx, (max[0] - min[0]) / 6.0f); + dy = minf(dy, (max[1] - min[1]) / 6.0f); return IN_RANGE_INCL(co[0], slide_zone[0] - dx, slide_zone[0] + dx) && IN_RANGE_INCL(co[1], slide_zone[1] - dy, slide_zone[1] + dy); @@ -425,14 +425,14 @@ static int get_mouse_pattern_corner(SpaceClip *sc, MovieTrackingMarker *marker, cur_len = len_v2v2(marker->pattern_corners[i], marker->pattern_corners[next]); - len = MIN2(cur_len, len); + len = minf(cur_len, len); } dx = 12.0f / width / sc->zoom; dy = 12.0f / height / sc->zoom; - dx = MIN2(dx, len * 2.0f / 3.0f); - dy = MIN2(dy, len * width / height * 2.0f / 3.0f); + dx = minf(dx, len * 2.0f / 3.0f); + dy = minf(dy, len * width / height * 2.0f / 3.0f); for (i = 0; i < 4; i++) { float crn[2]; @@ -463,8 +463,8 @@ static int mouse_on_offset(SpaceClip *sc, MovieTrackingTrack *track, MovieTracki dx = 12.0f / width / sc->zoom; dy = 12.0f / height / sc->zoom; - dx = MIN2(dx, (pat_max[0] - pat_min[0]) / 2.0f); - dy = MIN2(dy, (pat_max[1] - pat_min[1]) / 2.0f); + dx = minf(dx, (pat_max[0] - pat_min[0]) / 2.0f); + dy = minf(dy, (pat_max[1] - pat_min[1]) / 2.0f); return co[0] >= pos[0] - dx && co[0] <= pos[0] + dx && co[1] >= pos[1] - dy && co[1] <= pos[1] + dy; } diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c index 9581d7708fb..559fe8c840d 100644 --- a/source/blender/editors/space_clip/tracking_select.c +++ b/source/blender/editors/space_clip/tracking_select.c @@ -107,7 +107,7 @@ static int mouse_on_crns(float co[2], float pos[2], float crns[4][2], float epsx { float dist = dist_to_crns(co, pos, crns); - return dist < MAX2(epsx, epsy); + return dist < maxf(epsx, epsy); } static int track_mouse_area(const bContext *C, float co[2], MovieTrackingTrack *track) @@ -128,8 +128,8 @@ static int track_mouse_area(const bContext *C, float co[2], MovieTrackingTrack * epsy = MIN4(pat_min[1] - marker->search_min[1], marker->search_max[1] - pat_max[1], fabsf(pat_min[1]), fabsf(pat_max[1])) / 2; - epsx = MAX2(epsx, 2.0f / width); - epsy = MAX2(epsy, 2.0f / height); + epsx = maxf(epsx, 2.0f / width); + epsy = maxf(epsy, 2.0f / height); if (sc->flag & SC_SHOW_MARKER_SEARCH) { if (mouse_on_rect(co, marker->pos, marker->search_min, marker->search_max, epsx, epsy)) |