fix max std lib (#2391)

This commit is contained in:
Kurt Hutten
2024-05-19 16:42:22 +10:00
committed by GitHub
parent d92e6f6453
commit 75b9d2913f

View File

@ -239,7 +239,7 @@ pub async fn max(args: Args) -> Result<MemoryItem, KclError> {
tags = ["math"],
}]
fn inner_max(args: Vec<f64>) -> f64 {
let mut max = std::f64::MAX;
let mut max = std::f64::MIN;
for arg in args.iter() {
if *arg > max {
max = *arg;