diff options
| author | a1xd <[email protected]> | 2020-08-11 23:49:34 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-08-11 23:49:34 -0400 |
| commit | 08759509371ada546c8d9bc4053b9450c4f58e8b (patch) | |
| tree | 7ffc41237725e3ec0e9f53313644365912ded060 /common/rawaccel.hpp | |
| parent | Merge pull request #12 from JacobPalecki/GUI (diff) | |
| parent | define exceptions for invalid arg & io errors (diff) | |
| download | rawaccel-08759509371ada546c8d9bc4053b9450c4f58e8b.tar.xz rawaccel-08759509371ada546c8d9bc4053b9450c4f58e8b.zip | |
Merge pull request #13 from a1xd/write-cd
write cooldown
Diffstat (limited to 'common/rawaccel.hpp')
| -rw-r--r-- | common/rawaccel.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/rawaccel.hpp b/common/rawaccel.hpp index 474f2aa..7aa1eb2 100644 --- a/common/rawaccel.hpp +++ b/common/rawaccel.hpp @@ -16,6 +16,8 @@ namespace rawaccel { + using milliseconds = double; + /// <summary> Struct to hold vector rotation details. </summary> struct rotator { @@ -104,8 +106,8 @@ namespace rawaccel { vec2<accel_scale_clamp> clamp; accel_function(const accel_fn_args& args) { - if (args.time_min <= 0) error("min time must be positive"); - if (args.acc_args.offset < 0) error("offset must not be negative"); + if (args.time_min <= 0) bad_arg("min time must be positive"); + if (args.acc_args.offset < 0) bad_arg("offset must not be negative"); accel.tag = args.accel_mode; accel.visit([&](auto& impl){ impl = { args.acc_args }; }); |