From 77143beb5fbafc586996e7ef6f856d5836b6a269 Mon Sep 17 00:00:00 2001
From: jsiegle <joshs@alleninstitute.org>
Date: Mon, 13 Oct 2014 15:25:36 -0700
Subject: [PATCH] Fix sign error in Box::isWaveformInside

---
 Source/Processors/SpikeSorter/SpikeSortBoxes.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Source/Processors/SpikeSorter/SpikeSortBoxes.cpp b/Source/Processors/SpikeSorter/SpikeSortBoxes.cpp
index 905ff2879..6689fedad 100644
--- a/Source/Processors/SpikeSorter/SpikeSortBoxes.cpp
+++ b/Source/Processors/SpikeSorter/SpikeSortBoxes.cpp
@@ -145,10 +145,10 @@ bool Box::LineSegmentIntersection(PointD p11, PointD p12, PointD p21, PointD p22
 bool Box::isWaveFormInside(SpikeObject *so)
 {
 	PointD BoxTopLeft(x, y);
-	PointD BoxBottomLeft(x, (y + h));
+	PointD BoxBottomLeft(x, (y - h));
 
 	PointD BoxTopRight(x + w, y);
-	PointD BoxBottomRight(x + w, (y + h));
+	PointD BoxBottomRight(x + w, (y - h));
 
 	// y,and h are given in micro volts.
 	// x and w and given in micro seconds.
-- 
GitLab