tame/core/numeric/boolean.xml

40 lines
1.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014-2022 Ryan Specialty Group, LLC.
This file is part of tame-core.
tame-core is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<package xmlns="http://www.lovullo.com/rater"
xmlns:c="http://www.lovullo.com/calc"
core="true"
desc="Numeric computations dealing with boolean algebra">
<import package="../base" />
<function name="not" desc="Negates a boolean value" sym="\lnot">
<param name="not_value" type="boolean" desc="Boolean value to negate" />
<c:const value="1" desc="Value of 1 if given value is zero">
<c:when name="not_value">
<c:eq>
<c:const value="0" desc="Value to assert against for returning 1" />
</c:eq>
</c:when>
</c:const>
</function>
</package>