Talk:Min - Math

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Was a native function really necessary for this? Isn't it basically this?:

if var1 < var2
    return var1
else
   return var2
endif

return var1 ; if both are equal

--Lisselli (talk) 2021-04-04T00:54:31 (EDT)

Yea the native is equivalent to evaluating minimum in a function body like youve shown. The native is useful when you dont want to write out the evaluation in a function body. This evaluation is common enough that it makes sense to be included in the base math script. But to answer your question directly, "Was a native function really necessary for this?". No, I guess not. Scrivener07 (talk) 2021-05-07T13:34:09 (EDT)