Commits

bergsoe committed 51bd71a

Better error message in [scale].

Comments (0)

Files changed (1)

src/PaplTrajectory.ml

 let shift_t1_to traj t1_new = shift traj (t1_new -. traj.t1)
 
 let scale { t0; t1; get } s =
-  if s <= 0. then invalid_arg "PaplTrajectory.scale: s <= 0."
+  if s <= 0. then
+    invalid_arg
+      ("PaplTrajectory.scale: s <= 0. " ^
+         "(s = " ^ (string_of_float s) ^ ")")
   else make
     (t0, t0 +. (t1 -. t0) *. s)
     (fun t -> get ((t -. t0) /. s +. t0))