summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLGeometry.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-05-09 16:05:14 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-05-10 09:59:04 -0700
commit1634058b51da4885224ba7f63aab14c7d794652f (patch)
tree810318a22f6d165466eace6804c247626b7fe891 /platform/darwin/src/MGLGeometry.h
parenta025d8327afeea74a9a1a8c9a9a237e21af917bb (diff)
downloadqtlocation-mapboxgl-1634058b51da4885224ba7f63aab14c7d794652f.tar.gz
[ios, osx] Reformatted documentation comments
Reformatted documentation comments in public headers in the OS X SDK and public headers shared between the iOS and OS X SDKs to wrap at column 80 and avoid excessive indentation that causes SourceKitten to detect code blocks.
Diffstat (limited to 'platform/darwin/src/MGLGeometry.h')
-rw-r--r--platform/darwin/src/MGLGeometry.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/platform/darwin/src/MGLGeometry.h b/platform/darwin/src/MGLGeometry.h
index 7ad5140400..af54d7b391 100644
--- a/platform/darwin/src/MGLGeometry.h
+++ b/platform/darwin/src/MGLGeometry.h
@@ -14,7 +14,10 @@ typedef struct MGLCoordinateSpan {
CLLocationDegrees longitudeDelta;
} MGLCoordinateSpan;
-/** Creates a new `MGLCoordinateSpan` from the given latitudinal and longitudinal deltas. */
+/**
+ Creates a new `MGLCoordinateSpan` from the given latitudinal and longitudinal
+ deltas.
+ */
NS_INLINE MGLCoordinateSpan MGLCoordinateSpanMake(CLLocationDegrees latitudeDelta, CLLocationDegrees longitudeDelta) {
MGLCoordinateSpan span;
span.latitudeDelta = latitudeDelta;
@@ -22,7 +25,10 @@ NS_INLINE MGLCoordinateSpan MGLCoordinateSpanMake(CLLocationDegrees latitudeDelt
return span;
}
-/** Returns `YES` if the two coordinate spans represent the same latitudinal change and the same longitudinal change. */
+/**
+ Returns `YES` if the two coordinate spans represent the same latitudinal change
+ and the same longitudinal change.
+ */
NS_INLINE BOOL MGLCoordinateSpanEqualToCoordinateSpan(MGLCoordinateSpan span1, MGLCoordinateSpan span2) {
return (span1.latitudeDelta == span2.latitudeDelta &&
span1.longitudeDelta == span2.longitudeDelta);
@@ -39,7 +45,10 @@ typedef struct MGLCoordinateBounds {
CLLocationCoordinate2D ne;
} MGLCoordinateBounds;
-/** Creates a new `MGLCoordinateBounds` structure from the given southwest and northeast coordinates. */
+/**
+ Creates a new `MGLCoordinateBounds` structure from the given southwest and
+ northeast coordinates.
+ */
NS_INLINE MGLCoordinateBounds MGLCoordinateBoundsMake(CLLocationCoordinate2D sw, CLLocationCoordinate2D ne) {
MGLCoordinateBounds bounds;
bounds.sw = sw;
@@ -61,7 +70,10 @@ NS_INLINE MGLCoordinateSpan MGLCoordinateBoundsGetCoordinateSpan(MGLCoordinateBo
bounds.ne.longitude - bounds.sw.longitude);
}
-/** Returns a coordinate bounds with southwest and northeast coordinates that are offset from those of the source bounds. */
+/**
+ Returns a coordinate bounds with southwest and northeast coordinates that are
+ offset from those of the source bounds.
+ */
NS_INLINE MGLCoordinateBounds MGLCoordinateBoundsOffset(MGLCoordinateBounds bounds, MGLCoordinateSpan offset) {
MGLCoordinateBounds offsetBounds = bounds;
offsetBounds.sw.latitude += offset.latitudeDelta;
@@ -71,8 +83,12 @@ NS_INLINE MGLCoordinateBounds MGLCoordinateBoundsOffset(MGLCoordinateBounds boun
return offsetBounds;
}
-/** Returns `YES` if the coordinate bounds covers no area.
- Note that a bounds may be empty but have a non-zero coordinate span (e.g., when its northeast point lies due north of its southwest point). */
+/**
+ Returns `YES` if the coordinate bounds covers no area.
+
+ @note A bounds may be empty but have a non-zero coordinate span (e.g., when its
+ northeast point lies due north of its southwest point).
+ */
NS_INLINE BOOL MGLCoordinateBoundsIsEmpty(MGLCoordinateBounds bounds) {
MGLCoordinateSpan span = MGLCoordinateBoundsGetCoordinateSpan(bounds);
return span.latitudeDelta == 0 || span.longitudeDelta == 0;