Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have set up this formel: (y * 1000) / 3600 = x
<xsl:template name="dws"> <xsl:param name="windspeed"/> <xsl:value-of select="($windspeed * 1000) div 3600"/> </xsl:template>
It works perfect! A little too perfect... One of the results are "5.277777777777778". I would like to be just "5". Any one who knows how to do that?
Hi Webspas,
You can use floor() to round down to nearest integer, and ceiling() to round up:
<xsl:value-of select="floor(($windspeed * 1000) div 3600)"/>
/Chriztian
Cool! Thanks (again) Chriztian!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Doing math with xslt
I have set up this formel: (y * 1000) / 3600 = x
It works perfect! A little too perfect... One of the results are "5.277777777777778". I would like to be just "5". Any one who knows how to do that?
Hi Webspas,
You can use floor() to round down to nearest integer, and ceiling() to round up:
/Chriztian
Cool! Thanks (again) Chriztian!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.