From 05467bf303cd1c5b80fb38cc5e5198618ec4b582 Mon Sep 17 00:00:00 2001 From: rexim Date: Mon, 25 Nov 2019 00:00:48 +0700 Subject: [PATCH] (#1142) snap_var4 -> snap_seg2seg --- src/game/level/level_editor/rect_layer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/level/level_editor/rect_layer.c b/src/game/level/level_editor/rect_layer.c index 8355cc01..28553829 100644 --- a/src/game/level/level_editor/rect_layer.c +++ b/src/game/level/level_editor/rect_layer.c @@ -564,7 +564,7 @@ void snap_var2seg(float *x, float y, } static -void snap_var4(float *x, float y, float xo, float yo, float st) +void snap_seg2seg(float *x, float y, float xo, float yo, float st) { snap_var(x, y, 0, 0, st); snap_var(x, y, 0, yo, st); @@ -786,11 +786,11 @@ void snap_rects(size_t ignore_index, Rect *a, const Rect b = rects[i]; if (segment_overlap(vec(a->x, a->x + a->w), vec(b.x, b.x + b.w))) { - snap_var4(&a->y, b.y, a->h, b.h, snapping_threshold); + snap_seg2seg(&a->y, b.y, a->h, b.h, snapping_threshold); } if (segment_overlap(vec(a->y, a->y + a->h), vec(b.y, b.y + b.h))) { - snap_var4(&a->x, b.x, a->w, b.w, snapping_threshold); + snap_seg2seg(&a->x, b.x, a->w, b.w, snapping_threshold); } } }