tpl: Add float template function
authorLucas Jenss <lucas@x3ro.de>
Wed, 27 Sep 2017 22:35:47 +0000 (00:35 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 28 Sep 2017 14:53:18 +0000 (16:53 +0200)
commit57adc539fc98dcb6fba8070b9611b8bd545f6f7f
tree6460e7c9ef36c7e52212e3ee364f7f0fe2d0138f
parentb277cb33e4dfa7440fca3b7888026944ce056154
tpl: Add float template function

Add a template function that allows conversion to float. This is
useful, for example, when passing aspect ratios into templates,
which tend to not be integers.

Fixes #3307
docs/content/functions/float.md [new file with mode: 0644]
tpl/cast/cast.go
tpl/cast/cast_test.go
tpl/cast/init.go