<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="clip" module="max" category="Math">
	<digest>
		Limit numbers to a certain range
	</digest>
	<description>
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Math
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				value to be constrained
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				minimum value
			</digest>
			<description>
			</description>
		</inlet>
		<inlet id="2" type="INLET_TYPE">
			<digest>
				maximum value
			</digest>
			<description>
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				output value
			</digest>
			<description>
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="minimum" optional="1" type="number">
			<digest>
				Minimum value
			</digest>
			<description>
				The minimum value is the lower limit to the range of output values allowed. If only one argument is present, it is used as both the minimum and maximum limit. If no argument is present, the minimum and maximum limit is 0.
			</description>
		</objarg>
		<objarg name="maximum" optional="1" type="number">
			<digest>
				Maximum value
			</digest>
			<description>
				The maximum value is the upper limit to the range of output values allowed. If only one argument is present, it is used as both the minimum and maximum limit. If no argument is present, the minimum and maximum limit is 0.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Constrain value to limits
			</digest>
			<description>
				The number is sent out the outlet, constrained within the minimum and maximum limits specified by the minimum and maximum limits. The <o>clip</o> object adapts the clipped output values to its input, so an integer input value will output an integer value regardless of the numeric type specified as an argument.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Constrain value to limits
			</digest>
			<description>
				The number is sent out the outlet, constrained within the minimum and maximum limits. The <o>clip</o> object adapts the clipped output values to its input, so a floating point input value will output a floating point value regardless of the numeric type specified as an argument.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Constrain list values to limits
			</digest>
			<description>
				Each number in the list is constrained within the minimum and maximum limits, and the constrained numbers are sent out as a list.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="minimum/maximum" optional="0" type="list" />
			</arglist>
			<digest>
				Set minimum and maximum limits
			</digest>
			<description>
				The word <m>set</m>, followed by two numbers, resets the minimum and maximum limits.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="clip.png" caption="Numbers are always kept within the specified range" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="maximum" />
		<seealso name="minimum" />
		<seealso name="split" />
		<seealso name="&lt;" />
		<seealso name="&lt;=" />
		<seealso name="&gt;" />
		<seealso name="&gt;=" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				When an <m>int</m> is received in the inlet, it is constrained within the specified minimum and maximum limits, then sent out the outlet. If the received number is less than the minimum limit, the minimum value is sent out; if the received number is greater than the maximum limit, the maximum value is sent out.
			</description>
		</entry>
		<entry name="float">
			<description>
				If the received number is a <m>float</m>, it is constrained within the specified minimum and maximum limits, then sent out the outlet as a <m>float</m>.
			</description>
		</entry>
		<entry name="list">
			<description>
				When a <m>list</m> is received in the inlet, each number is constrained within the specified minimum and maximum limits, and the numbers are sent out as a list.
			</description>
		</entry>
	</misc>
</c74object>
