Generation

generate functionSat, 12 Nov 2022

Map an array of ints to float

func mapIntsToFloats(arr []int) []float32 { var floatArr []float32 floatArr = make([]float32, len(arr)) for i := 0; i < len(arr); i++ { floatArr[i] = float32(arr[i]) } return floatArr }

Questions about programming?Chat with your personal AI assistant