本文整理匯總了PHP中Point::getCoordinates方法的典型用法代碼示例。如果您正苦於以下問題:PHP Point::getCoordinates方法的具體用法?PHP Point::getCoordinates怎麽用?PHP Point::getCoordinates使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Point
的用法示例。
在下文中一共展示了Point::getCoordinates方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor.
*
* @param float[][]|Point[] $positions
* @param CoordinateResolutionSystem|BoundingBox $arg,...
*/
public function __construct(array $positions)
{
$this->coordinates = array_map(function ($point) {
if (!$point instanceof Point) {
$point = new Point($point);
}
return $point->getCoordinates();
}, $positions);
if (func_num_args() > 1) {
$this->setOptionalConstructorArgs(array_slice(func_get_args(), 1));
}
}
示例2: addPoint
public function addPoint(Point $point)
{
$this->coordinates[] = $point->getCoordinates();
return $this;
}
示例3: precisionMagnavox
/**
* precisionMagnavox
*
* assumes that the Earth is an ellipsoid Earth (best precision here)
*
* @todo To test
* @todo Achieve the method (follow the link)
*
* @tutorial Sets
* @link http://inventeksys.com/GPS_Facts_Great_Circle_Distances.pdf
*
* @param Point $a
* @param Point $b
*/
public function precisionMagnavox(Point $a, Point $b)
{
$this->deltaLatitude = $b->getCoordinates()[0] - $a->getCoordinates()[0];
$this->deltaLongititude = $b->getCoordinates()[1] - $a->getCoordinates()[1];
$this->bearing = 0;
//@todo To test.
$this->gcd = 0;
//@todo To test.
}