You are here

function getlocations_normalizelat in Get Locations 7

Same name and namespace in other branches
  1. 7.2 getlocations.module \getlocations_normalizelat()

Normalizes a latitude to the [-90,90] range. Latitudes above 90 or below -90 are capped, not wrapped.

@type Number

Parameters

{Number} lat The latitude to normalize, in degrees.:

Return value

Returns the latitude, fit within the [-90,90] range.

3 calls to getlocations_normalizelat()
getlocations_fields_handler_argument_bbox::_convert_bbox_coords in modules/getlocations_fields/handlers/getlocations_fields_handler_argument_bbox.inc
Split BBOX string into {left, bottom, right, top}
getlocations_fields_save_locations in modules/getlocations_fields/getlocations_fields.module
getlocations_latlon_check in ./getlocations.module
Function to check a lat,lon string

File

./getlocations.module, line 6487
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_normalizelat($lat) {
  return max(-90, min(90, $lat));
}