# toFloat

URL: https://caijiao.org/radash/number/to-float
Source: docs/radash/number/to-float.md
Description: 尽可能将值转换为浮点数 '_.toFloat'函数会尽力将给定的值转换为浮点数

尽可能将值转换为浮点数


## 基本用法

`_.toFloat`函数会尽力将给定的值转换为浮点数。

```ts
import { toFloat } from 'radash'

toFloat(0) // => 0.0
toFloat(null) // => 0.0
toFloat(null, 3.33) // => 3.33
```
