How to find max value for Double and Float in Swift

后端 未结 7 1649
情歌与酒
情歌与酒 2020-12-23 23:55

Current learning Swift, there are ways to find max and min value for different kind of Integer like Int.max and Int.min

7条回答
  •  余生分开走
    2020-12-24 00:41

    Also CGFloat.infinity, Double.infinity or just .infinity can be useful in such situations.

提交回复
热议问题