Here you can find the source of distanceSquared(int[] referenceBlock, float[] center)
private static float distanceSquared(int[] referenceBlock, float[] center)
//package com.java2s; //License from project: Open Source License public class Main { private static float distanceSquared(int[] referenceBlock, float[] center) { float distX = referenceBlock[0] - center[0]; float distY = referenceBlock[1] - center[1]; float distZ = referenceBlock[2] - center[2]; return distX * distX + distY * distY + distZ * distZ; }/* w ww .j a v a 2 s. c om*/ }