mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-21 05:05:00 -07:00
28 lines
312 B
Odin
28 lines
312 B
Odin
// import "other"
|
|
|
|
TAU :: 6.28;
|
|
PI :: PI/2;
|
|
|
|
type AddProc: proc(a, b: int) -> int;
|
|
|
|
|
|
do_thing :: proc(p: AddProc) {
|
|
p(1, 2);
|
|
}
|
|
|
|
add :: proc(a, b: int) -> int {
|
|
return a + b;
|
|
}
|
|
|
|
|
|
main :: proc() {
|
|
x : int = 2;
|
|
x = x * 3;
|
|
|
|
// do_thing(add(1, x));
|
|
do_thing(proc(a, b: int) -> f32 {
|
|
return a*b - a%b;
|
|
});
|
|
|
|
}
|