1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>step
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>step
</refname>
17 <refpurpose>generate a step function by comparing two values
</refpurpose>
19 <refsynopsisdiv><title>Declaration
</title>
22 <funcdef>genType
<function>step
</function></funcdef>
23 <paramdef>genType
<parameter>edge
</parameter></paramdef>
24 <paramdef>genType
<parameter>x
</parameter></paramdef>
29 <funcdef>genType
<function>step
</function></funcdef>
30 <paramdef>float
<parameter>edge
</parameter></paramdef>
31 <paramdef>genType
<parameter>x
</parameter></paramdef>
36 <funcdef>genDType
<function>step
</function></funcdef>
37 <paramdef>genDType
<parameter>edge
</parameter></paramdef>
38 <paramdef>genDType
<parameter>x
</parameter></paramdef>
43 <funcdef>genDType
<function>step
</function></funcdef>
44 <paramdef>double
<parameter>edge
</parameter></paramdef>
45 <paramdef>genDType
<parameter>x
</parameter></paramdef>
49 <refsect1 id=
"parameters"><title>Parameters
</title>
52 <term><parameter>edge
</parameter></term>
55 Specifies the location of the edge of the step function.
60 <term><parameter>x
</parameter></term>
63 Specify the value to be used to generate the step function.
69 <refsect1 id=
"description"><title>Description
</title>
71 <function>step
</function> generates a step function by comparing
<parameter>x
</parameter> to
<parameter>edge
</parameter>.
74 For element
<emphasis>i
</emphasis> of the return value,
0.0 is returned if
<parameter>x
</parameter>[
<emphasis>i
</emphasis>]
75 < <parameter>edge
</parameter>[
<emphasis>i
</emphasis>], and
1.0 is returned otherwise.
78 <refsect1 id=
"versions"><title>Version Support
</title>
79 <informaltable frame=
"topbot">
84 <entry>step (genType)
</entry>#newin11#
87 <entry>step (genDType)
</entry>#newin40#
93 <refsect1 id=
"seealso"><title>See Also
</title>
95 <citerefentry><refentrytitle>mix
</refentrytitle></citerefentry>,
96 <citerefentry><refentrytitle>smoothstep
</refentrytitle></citerefentry>
99 <refsect1 id=
"Copyright"><title>Copyright
</title>
101 Copyright
<trademark class=
"copyright"></trademark> 2011 Khronos Group.
102 This material may be distributed subject to the terms and conditions set forth in
103 the Open Publication License, v
1.0,
8 June
1999.
104 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.