Skip to content

Instantly share code, notes, and snippets.

@heronyang
Created August 3, 2019 20:34
Show Gist options
  • Save heronyang/b80215f88df00c7afc22d0c436f32bc9 to your computer and use it in GitHub Desktop.
Save heronyang/b80215f88df00c7afc22d0c436f32bc9 to your computer and use it in GitHub Desktop.
/* main.c */
#include "point.h"
#include "labeledPoint.h"
#include <stdio.h>
int main(int argc, char** argv) {
struct LabeledPoint* origin = makeLabeledPoint(0.0, 0.0, "origin");
struct LabeledPoint* lowerLeft = makeLabeledPoint(-1.0, -1.0, "lowerLeft");
printf("distance = %f\n", getDistance(
(struct Point*) origin, (struct Point*) lowerLeft));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment