summaryrefslogtreecommitdiffstats
path: root/example/ufo.c
diff options
context:
space:
mode:
authorEthan Werner <mail@ethanwerner.com>2026-06-09 01:17:41 +0400
committerEthan Werner <mail@ethanwerner.com>2026-06-09 01:17:41 +0400
commit96ecf29e8be977f51f351308ef2c7c492bb829aa (patch)
treec664aa61262e6f7627a732f0e4fbb84281b99952 /example/ufo.c
parentf6a144987cc403de8ad6bddd055f756120f8d405 (diff)
refactor
Diffstat (limited to 'example/ufo.c')
-rwxr-xr-xexample/ufo.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/example/ufo.c b/example/ufo.c
new file mode 100755
index 0000000..fcd1b5c
--- /dev/null
+++ b/example/ufo.c
@@ -0,0 +1,22 @@
+// ufo.c - Example usage of ufo.h Universal Function Originator
+
+#define UFO_IMPLEMENTATION
+#include "../include/ufo.h"
+
+
+#include <stdio.h>
+#include <stdlib.h>
+
+
+int main(void) {
+ ufo_t *ufo = ufo_init(1, 100);
+ if (!ufo) {
+ fprintf(stderr, "Failed to initialize UFO\n");
+ return 1;
+ }
+ printf("%f\n", ufo_evaluate(ufo, (f64[]){1.0}));
+ ufo_free(ufo);
+
+ return 0;
+}
+