pub const raylib = @cImport({
    @cInclude("raylib.h");
    @cInclude("raymath.h");
});

pub const v3 = struct {
    pub inline fn new(x: f32, y: f32, z: f32) raylib.Vector3 {
        return raylib.Vector3{ .x = x, .y = y, .z = z };
    }
    pub inline fn newShifted(x: f32, y: f32, z: f32, comptime d: comptime_int) raylib.Vector3 {
        if (d % 3 == 0) {
            return new(x, y, z);
        } else if (d % 3 == 1) {
            return new(y, z, x);
        } else if (d % 3 == 2) {
            return new(z, x, y);
        }
    }
    pub inline fn add(a: raylib.Vector3, b: raylib.Vector3) raylib.Vector3 {
        return raylib.Vector3Add(a, b);
    }
    pub inline fn sub(a: raylib.Vector3, b: raylib.Vector3) raylib.Vector3 {
        return raylib.Vector3Subtract(a, b);
    }
    pub inline fn neg(a: raylib.Vector3) raylib.Vector3 {
        return raylib.Vector3Negate(a);
    }
    pub inline fn scl(a: raylib.Vector3, b: f32) raylib.Vector3 {
        return raylib.Vector3Scale(a, b);
    }
    pub inline fn nor(a: raylib.Vector3) raylib.Vector3 {
        return raylib.Vector3Normalize(a);
    }
    pub inline fn cross(a: raylib.Vector3, b: raylib.Vector3) raylib.Vector3 {
        return raylib.Vector3CrossProduct(a, b);
    }
    pub inline fn rotate(vec: raylib.Vector3, axis: raylib.Vector3, angle: f32) raylib.Vector3 {
        return raylib.Vector3RotateByAxisAngle(vec, axis, angle);
    }
};
