Check Lat/Long is Inside/Outside of fencing <?php function onLine($side,$point) //check whether p is on the line or not { if ($point['x'] <= max($side['x']['x'], $side['y']['x']) && $point['x'] <= min($side['x']['x'], $side['y']['x']) && ($point['y'] <= max($side['x']['y'], $side['y']['y']) && $point['y'] <= min($side['x']['y'], $side['y']['y']))) return true; return false; } function direction($point1,$point2,$point3) { $val=($point2['y']-$point1['y'])*($point3['x']-$point2['x'])-($point2['x']-$point1['x'])*($point3['y']-$point2['y']); if ($val == 0) return 0; //colinear else if ($val <0) return 2; //anti-clockwise direction return 1; //clockwise direction } function...
A Passionate full stack developer with 7 years of amazing experience in full stack application development and expertise in technologies like React Native, NextJS, ReactJS, Codeigniter, PHP , NodeJs. He has huge craze in learning new things about technologies and constantly shares his knowledge with others.