Terrain editor

consider ternary operator instead. then the compiler can rather use conditional instructions instead of branches