Hello, coming from a C# background I am having trouble getting my head around zig's struct system.
How come this doesn't work on https://godbolt.org/ ?
var vector: @Vector(3, f32) = @Vector(3, f32) { 0, 0, 0 };
pub fn add(self: @This(), other: f32_3) f32_3 {
return self.vector + other.vector;
}
};
I am not super familiar with pointers so maybe I have to dereference something or somewhat??
It throws this error error: no field named 'vector' in struct '