optimized terrain noise process with haxe inlining