Skip to navigation


Version analysis of ALTIT

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

.ALTIT

Code variation 1 of 2A variation in the comments only

Tap on a block to expand it, and tap it again to revert.

SKIP 1 \ Our altitude above the surface of the planet or sun
SKIP 1 \ Our altitude above the surface of the planet
                        \
                        \   * 255 = we are a long way above the surface
                        \
                        \   * 1-254 = our altitude as the square root of:
                        \
                        \       x_hi^2 + y_hi^2 + z_hi^2 - 6^2
                        \
                        \     where our ship is at the origin, the centre of the

Code variation 2 of 2A variation in the comments only

Tap on a block to expand it, and tap it again to revert.

\ planet/sun is at (x_hi, y_hi, z_hi), and the \ radius of the planet/sun is 6
\ planet is at (x_hi, y_hi, z_hi), and the radius \ of the planet is 6
                        \
                        \   * 0 = we have crashed into the surface