mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-18 00:48:23 +00:00
40 lines
605 B
Odin
40 lines
605 B
Odin
#import "fmt.odin";
|
|
#import "atomic.odin";
|
|
#import "hash.odin";
|
|
#import "math.odin";
|
|
#import "mem.odin";
|
|
#import "opengl.odin";
|
|
#import "os.odin";
|
|
#import "sync.odin";
|
|
#import "utf8.odin";
|
|
|
|
main :: proc() {
|
|
i: int;
|
|
|
|
x: [dynamic]f64;
|
|
defer free(x);
|
|
append(^x, 2_000_000.500_000, 3, 5, 7);
|
|
|
|
for p, i in x {
|
|
if i > 0 { fmt.print(", "); }
|
|
fmt.print(p);
|
|
}
|
|
fmt.println();
|
|
|
|
{
|
|
Vec3 :: [vector 3]f32;
|
|
|
|
x := Vec3{1, 2, 3};
|
|
y := Vec3{4, 5, 6};
|
|
fmt.println(x < y);
|
|
fmt.println(x + y);
|
|
fmt.println(x - y);
|
|
fmt.println(x * y);
|
|
fmt.println(x / y);
|
|
|
|
for i in x {
|
|
fmt.println(i);
|
|
}
|
|
}
|
|
}
|