#===============================================================================
#
#   Sample external MethodScript include. To use these functions, uncomment them.
#
#===============================================================================

/**
 * Returns the distance between two blocks, or any other 3d points, for that matter.
 * @param array @arr1 The first point, expects an array of x, y, z
 * @param array @arr2 The second point, expects an array of x, y, z
 */
/*proc _3d_distance(array @arr1, array @arr2){
    return(
        floor(
            sqrt(				
                  ((@arr2[0] - @arr1[0]) ** 2)
				+ ((@arr2[1] - @arr1[1]) ** 2)
				+ ((@arr2[2] - @arr1[2]) ** 2)
            )
        )
    );
}*/

/**
 * Given two blocks, iterates through all the blocks inside the cuboid, and calls the 
 * user defined closure on them. The used defined closure should accept 3 parameters,
 * the x, y, and z coordinates of the block.
 */
/*proc _iterate_cuboid(array @b1, array @b2, closure @callback){
        for(@x = min(@b1[0], @b2[0]), @x <= max(@b1[0], @b2[0]), @x++){
                for(@y = min(@b1[1], @b2[1]), @y <= max(@b1[1], @b2[1]), @y++){
                        for(@z = min(@b1[2], @b2[2]), @z <= max(@b1[2], @b2[2]), @z++){
                                execute(@x, @y, @z, @callback);
                        }
                }
        }
}*/