mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: restrict numeric promotions to cases where no data is lost
This commit is contained in:
@ -65,6 +65,6 @@ pub fn dice_coefficient(s1, s2 string) f32 {
|
||||
intersection_size++
|
||||
}
|
||||
}
|
||||
return (2.0 * intersection_size) / (f32(a.len) + f32(b.len) - 2)
|
||||
return (2.0 * f32(intersection_size)) / (f32(a.len) + f32(b.len) - 2)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user