| | -<?xml version="1.0" encoding="utf-8"?> |
| | -<!-- |
| | - | MIT License |
| | - | |
| | - | Copyright 2014 White Magic Software, Inc. |
| | - +--> |
| | -<xsl:stylesheet version="2.0" |
| | - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| | - xmlns:math="http://exslt.org/math" |
| | - extension-element-prefixes="math"> |
| | - |
| | -<xsl:variable name="PI">3.14159265358979323846264338327950</xsl:variable> |
| | -<xsl:variable name="PHI">1.61803398874989484820458683436564</xsl:variable> |
| | -<xsl:variable name="PIDIV2" select="$PI div 2.0"/> |
| | -<xsl:variable name="RADIANS" select="$PI div 180.0"/> |
| | -<xsl:variable name="ROOT_PRECISION" select="0.00001"/> |
| | - |
| | -<!-- Calculates: |x| --> |
| | -<!-- http://en.wikipedia.org/wiki/Absolute_value --> |
| | -<xsl:template name="abs"> |
| | - <xsl:param name="x"/> |
| | - <!--xsl:value-of select="($x >= 0) * $x - not($x >= 0) * $x"/--> |
| | - <xsl:value-of select="math:abs( $x )"/> |
| | -</xsl:template> |
| | - |
| | -</xsl:stylesheet> |
| | |