dennis.malmgren
dennis.malmgren
MModular
Created by dennis.malmgren on 12/11/2023 in #questions
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
3 replies