• Модуль: location
  • Путь к файлу: ~/bitrix/modules/location/lib/geometry/type/point.php
  • Класс: BitrixLocationGeometryTypePoint
  • Вызов: Point::__construct
public function __construct(float $lat, float $lng)
{
	if (!$this->isValidLatitude($lat))
	{
		throw new InvalidArgumentException('Latitude value must be numeric -90.0 .. +90.0 (given: ' . $lat . ')');
	}

	if (!$this->isValidLongitude($lng))
	{
		throw new InvalidArgumentException(
			'Longitude value must be numeric -180.0 .. +180.0 (given: ' . $lng . ')'
		);
	}

	$this->lat = $lat;
	$this->lng = $lng;
}