From 65a74b97c0c9ac8ca10312c0749e33df9e64b3d9 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 11 Aug 2020 23:06:39 -0700 Subject: Disallow differing x and y weights with gain cap --- common/accel-base.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/accel-base.hpp') diff --git a/common/accel-base.hpp b/common/accel-base.hpp index 91510a4..60b7362 100644 --- a/common/accel-base.hpp +++ b/common/accel-base.hpp @@ -24,6 +24,7 @@ namespace rawaccel { double exponent = 2; double midpoint = 0; double power_scale = 1; + double gain_cap = 0; vec2d weight = { 1, 1 }; }; @@ -68,6 +69,7 @@ namespace rawaccel { /// Arguments to verified. void verify(const accel_args& args) const { if (args.accel < 0) bad_arg("accel can not be negative, use a negative weight to compensate"); + if (args.gain_cap > 0 && weight.x != weight.y) bad_arg("weight x and y values must be equal with a gain cap"); } accel_base() = default; -- cgit v1.2.3