1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fix examples

This commit is contained in:
Alexander Medvednikov
2019-08-07 14:16:10 +02:00
parent b5d67f226f
commit 4b69d43f9f
5 changed files with 9 additions and 5 deletions

View File

@@ -68,7 +68,7 @@ fn advance(sys System, dt f64) {
}
}
fn offsetmomentum(sys System) {
fn offsetmomentum(sys mut System) {
mut px := f64(0)
mut py := f64(0)
mut pz := f64(0)
@@ -121,7 +121,7 @@ pub fn arr_position() []Position {
fn main() {
sys := &System {arr_momentum(), arr_position()}
offsetmomentum(sys)
offsetmomentum(mut sys)
println('${energy(sys):.9f}') //-0.169075164
for i := 0; i < 50000000; i++ {