mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 03:21:29 +00:00
Rounding imperial export for profile
Precision for the rounding is more than makes sense, but this satisfied the test case. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
726c9e859c
commit
a489b3fa42
2 changed files with 3 additions and 3 deletions
|
@ -327,7 +327,7 @@
|
||||||
<xsl:value-of select="translate($depth, ',', '.')"/>
|
<xsl:value-of select="translate($depth, ',', '.')"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="translate(translate($depth, translate($depth, '0123456789,.', ''), ''), ',', '.') * 0.3048"/>
|
<xsl:value-of select="round(translate(translate($depth, translate($depth, '0123456789,.', ''), ''), ',', '.') * 0.3048 * 1000) div 1000"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
|
|
|
@ -34,10 +34,10 @@
|
||||||
<xsl:value-of select="$fs"/>
|
<xsl:value-of select="$fs"/>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$units = 1">
|
<xsl:when test="$units = 1">
|
||||||
<xsl:value-of select="concat('"', format-number((substring-before(@depth, ' ') div 0.3048), '#.#'), ' ft"')"/>
|
<xsl:value-of select="concat('"', round((substring-before(@depth, ' ') div 0.3048) * 1000) div 1000, ' ft"')"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="concat('"', substring-before(@depth, ' '), '"')"/>
|
<xsl:value-of select="concat('"', round(substring-before(@depth, ' ') * 1000) div 1000, '"')"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue