I need a way to find the minimum of two values in FreeMarker, and I tried doing this, but it fails:

```
<#function min a b>
  <if a gt b>
    <#return b />
  <else>
    <#return a />
  </if>
</#function>

   ...

/* min#1 ${min(0.280617, 1.0)} */
/* min#2 ${min(1.0, 0.280617)} */

```

Instead of printing out 0.280617 on both lines, I get this:

```
/* min#1 1 */
/* min#2 0.280617 */

```

Why? And how can I fix it?