You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Structure from C bindings without overloaded equal method throws C error when checking if array contains element #21
pub type TSVector3f = C.TSVector3f
#[typedef]
struct C.TSVector3f {
x Float32_t
y Float32_t
z Float32_t
}
mut random_positions := []tellusim.TSVector3f{cap: objects_count}
if random_positions.contains(random_cell_position)
throws
C compiler output:
/home/yuart/Projects/spawn/out.c: In function ‘Array_mG_tellusim___TSVector3f_eG__contains’:
/home/yuart/Projects/spawn/out.c:831:26: error: invalid operands to binary == (have ‘tellusim___TSVector3f’ {aka ‘TSVector3f’} and ‘tellusim___TSVector3f’ {aka ‘TSVector3f’})
831 | if (item == value) {
| ^~
error: C compiler failed
Activity