@[email protected] to Programmer [email protected]English • 6 months agoHappens all the timesh.itjust.worksimagemessage-square20fedilinkarrow-up1516arrow-down17
arrow-up1509arrow-down1imageHappens all the timesh.itjust.works@[email protected] to Programmer [email protected]English • 6 months agomessage-square20fedilink
minus-square@ParanoiaComplexlink9•edit-26 months agoI don’t know Rust but jump typically moves the program counter, where the height represents the number of instructions to move
minus-square@trxxruraxvrlink14•6 months agoAfaik rust doesn’t have functions like that as they lead to unsafe code that’s impossible to check variable lifetimes for. I think OP created the jump function.
minus-square@RustyNovalink14•6 months agoThey created it. The compiler says the jump function is in src/main.rs
minus-square@[email protected]linkfedilink1•6 months agoBut then wouldn’t it be fly(height: f64) instead of jump(height: i32)?
Height should be a float
I don’t know Rust but jump typically moves the program counter, where the height represents the number of instructions to move
Afaik rust doesn’t have functions like that as they lead to unsafe code that’s impossible to check variable lifetimes for. I think OP created the jump function.
They created it. The compiler says the jump function is in src/main.rs
It’s height in centimeters
deleted by creator
Chad quantised rust
But then wouldn’t it be
fly(height: f64)
instead ofjump(height: i32)
?Never use floats.