mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
examples: improve the pendulum simulation, with several modes and diagrams (#13446)
This commit is contained in:
parent
a74d28ae5f
commit
4391ae563d
26 changed files with 1501 additions and 366 deletions
9
examples/pendulum-simulation/modules/sim/log.v
Normal file
9
examples/pendulum-simulation/modules/sim/log.v
Normal file
|
@ -0,0 +1,9 @@
|
|||
module sim
|
||||
|
||||
// log is a helper function to print debug info
|
||||
[inline]
|
||||
pub fn log(info string) {
|
||||
$if verbose ? {
|
||||
println(info)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue