ModularM
Modular3y ago
2 replies
dennis.malmgren

Type conversion between basic types

I seem to struggle to figure out how to convert basic types. There are to_int() functions but converting to bool or to float from int or similar stumps me. How is it supposed to work?

The code
let a: Int32 = 5
let b: Float32 = Float32(a)

gives me "cannot construct 'SIMD[f32, 1]' from 'SIMD[si32, 1]' value in 'let' initializer
Was this page helpful?