2021-11-19 15:21:46 +08:00
|
|
|
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
|
|
|
|
//
|
|
|
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
|
|
|
// If a copy of the MIT was not distributed with this file,
|
|
|
|
|
// You can obtain one at https://github.com/gogf/gf.
|
|
|
|
|
|
|
|
|
|
package gconv
|
|
|
|
|
|
|
|
|
|
// Float32 converts `any` to float32.
|
2024-12-18 10:41:09 +08:00
|
|
|
func Float32(any any) float32 {
|
2025-03-06 23:04:26 +08:00
|
|
|
v, _ := defaultConverter.Float32(any)
|
2024-12-18 10:41:09 +08:00
|
|
|
return v
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 15:21:46 +08:00
|
|
|
// Float64 converts `any` to float64.
|
2024-12-18 10:41:09 +08:00
|
|
|
func Float64(any any) float64 {
|
2025-03-06 23:04:26 +08:00
|
|
|
v, _ := defaultConverter.Float64(any)
|
2024-12-18 10:41:09 +08:00
|
|
|
return v
|
|
|
|
|
}
|