From 088dddcd454d58efc2545a78d4f7a126b9c7e4c0 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 6 Jan 2019 00:04:54 -0500 Subject: Fix normalization of game controller axis values. * chickadee.scm (controller-axis): Fix math so that axis values are actually in the range [0, 1]. --- chickadee.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'chickadee.scm') diff --git a/chickadee.scm b/chickadee.scm index 478cf6c..e14f924 100644 --- a/chickadee.scm +++ b/chickadee.scm @@ -105,9 +105,8 @@ "Return a floating point value in the range [-1, 1] corresponding to how much AXIS is being pushed on CONTROLLER. 0 is returned if AXIS is not being pushed at all." - (- (/ (sdl2:game-controller-axis controller axis) - 32768.0) - 0.5)) + (/ (sdl2:game-controller-axis controller axis) + 32768.0)) (define current-window (make-parameter #f)) -- cgit v1.2.3