function helice($l, $n, $d, $h) { return sqrt(powr($l) + powr($n) + powr($d) + powr($h)); }
/** ************************************************* Function makeBcast will take in the ID array and create the broadcast ID for the given host IP ************************************************* **/ function makeBcast($mask, $idArr) { $bcast = array(0, 0, 0, 0); $oct = (int) ($mask / 8); for ($i = 0; $i < $oct; $i++) { $bcast[$i] = $idArr[$i]; } $inc = powr(2, 8 - $mask % 8); $bcast[$oct] = $idArr[$oct] + $inc - 1; for ($j = $oct + 1; $j < 4; $j++) { $bcast[$j] = 255; } return $bcast; }