15

Have issues trying to get the jina2 template to perform a rounding. I don't really mind what happens, as all my numbers have been produced by multiplying a decimal less then 1 (e.g. 0.31) then multiplied by 100. So I have 31.0. I want to drop the decimal place, but nothing appears to work:

{{row.score.combined*100|float|round(0, 'floor')}}

or even the more easy:

{{row.score.combined*100|int}}

or even:

{{row.score.combined*100|round|int}}

I still get 31.0 in all cases.

disruptive
  • 5,687
  • 15
  • 71
  • 135

1 Answers1

29

Requires brackets around the multiplication. Rounding was only occurring on the 100.

{{(row.score.combined*100)|int}}
disruptive
  • 5,687
  • 15
  • 71
  • 135