I am looking for a function to round to the nearest 0.05 in Golang . The end result of using the function must always be a factor of 0.05.
Here are some examples of outputs for the function I am looking for: (The function Round doesn’t exist yet, I am hoping it can be included in the answer)
Round(0.363636) // 0.35 Round(3.232) // 3.25 Round(0.4888) // 0.5
I have searched around for ages now and haven’t found any answers.