[chronojump] Fixed force sensor X plot
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed force sensor X plot
- Date: Thu, 26 Oct 2017 06:39:27 +0000 (UTC)
commit c305d53ce0ae3dee5a4d48ddd1d2dfc238e93f23
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Oct 26 08:38:27 2017 +0200
Fixed force sensor X plot
src/forceSensor.cs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index 323d06a..90da9bd 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -70,7 +70,7 @@ public class ForceSensorCapturePoints
public int GetTimeInPx(int time)
{
//without 1.0 calculation is done as int producint very buggy value
- return marginLeft + Convert.ToInt32(1.0 * widthG * time / RealWidthG);
+ return marginLeft + Convert.ToInt32(1.0 * (widthG -marginLeft -marginRight) * time /
RealWidthG);
}
public int GetForceInPx(double force)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]