feat: lift runtime into language, start of zelus 2024 compatibility
This commit is contained in:
parent
dc8d941b84
commit
ffc583985a
37 changed files with 1154 additions and 143 deletions
|
|
@ -1,21 +0,0 @@
|
|||
let g = 9.81
|
||||
let y0 = 0.0
|
||||
let y'0 = 10.0
|
||||
|
||||
let hybrid ball () = (y, y', z) where
|
||||
rec der y = y' init y0
|
||||
and der y' = -. g init y'0 reset z -> -0.8 *. (last y')
|
||||
and z = up(-. y)
|
||||
|
||||
let hybrid main () =
|
||||
let der t = 1.0 init 0.0 in
|
||||
let s = period(0.01) in
|
||||
let (y, y', z) = ball () in
|
||||
present z | s -> (
|
||||
print_float t;
|
||||
print_string "\t";
|
||||
print_float y;
|
||||
(* print_string "\t";
|
||||
print_float y'; *)
|
||||
print_newline ()
|
||||
); ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue