diff options
| -rw-r--r-- | common/rawaccel-validate.hpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/common/rawaccel-validate.hpp b/common/rawaccel-validate.hpp index 2e892a5..4ea7936 100644 --- a/common/rawaccel-validate.hpp +++ b/common/rawaccel-validate.hpp @@ -53,9 +53,6 @@ namespace rawaccel { if (args.input_offset < 0) { error("offset can not be negative"); } - else if (args.mode == accel_mode::jump && args.input_offset == 0) { - error("offset can not be 0"); - } if (args.output_offset < 0) { error("offset can not be negative"); @@ -85,12 +82,22 @@ namespace rawaccel { error("cap < offset"); } - if (args.growth_rate <= 0 || - args.decay_rate <= 0 || - args.acceleration <= 0) { + if (args.acceleration <= 0) { error("acceleration"" must be positive"); } + if (args.scale <= 0) { + error("scale"" must be positive"); + } + + if (args.growth_rate <= 0) { + error("growth rate"" must be positive"); + } + + if (args.decay_rate <= 0) { + error("decay rate"" must be positive"); + } + if (args.motivity <= 1) { error("motivity must be greater than 1"); } @@ -99,10 +106,6 @@ namespace rawaccel { error("exponent must be greater than 1"); } - if (args.scale <= 0) { - error("scale"" must be positive"); - } - if (args.exponent_power <= 0) { error("exponent"" must be positive"); } |