13 lines
284 B
Objective-C
13 lines
284 B
Objective-C
#import <stdio.h>
|
|
|
|
void printPoint(double* point) {
|
|
printf("[%lf, %lf]", point[0], point[1]);
|
|
}
|
|
|
|
void printPointerAsCoords(double * arr, int len) {
|
|
for (int i = 0; i < len; i += 2) {
|
|
printPoint(arr + i);
|
|
if (i < len - 2) printf(", ");
|
|
}
|
|
printf("\n");
|
|
} |