Here you can find the source of distanceSqured(int x, int y, int z, int x1, int y1, int z1)
public static int distanceSqured(int x, int y, int z, int x1, int y1, int z1)
//package com.java2s; //License from project: Open Source License public class Main { public static int distanceSqured(int x, int y, int z, int x1, int y1, int z1) { return (x - x1) * (x - x1) + (y - y1) * (y - y1) + (z - z1) * (z - z1);//from w ww. j a v a2 s . c o m } }