Skip to content

Commit

Permalink
Added category for math nodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
stebanos committed Sep 13, 2012
1 parent 8349272 commit 27ba732
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions libraries/math/math.ndbx
Expand Up @@ -2,21 +2,21 @@
<ndbx formatVersion="2" type="file" uuid="b299e4dc-c763-4008-b8cb-d631e03c5c0a">
<link href="java:nodebox.function.MathFunctions" rel="functions"/>
<node description="Calculate using numbers." name="root" renderedChild="slow_number">
<node description="Convert every number to a positive number." function="math/abs" image="generic.png" name="abs" outputType="float" position="4.00,1.00">
<node description="Convert every number to a positive number." function="math/abs" image="generic.png" name="abs" outputType="float" position="4.00,1.00" category="math">
<port name="value" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Add two numbers." function="math/add" image="add.png" name="add" position="4.00,2.00">
<node description="Add two numbers." function="math/add" image="add.png" name="add" position="4.00,2.00" category="math">
<port name="value1" range="value" type="float" value="0.0" widget="float"/>
<port name="value2" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Calculate the angle between two points." function="math/angle" image="angle.png" name="angle" outputType="float" position="10.00,4.00">
<node description="Calculate the angle between two points." function="math/angle" image="angle.png" name="angle" outputType="float" position="10.00,4.00" category="math">
<port name="point1" range="value" type="point" value="0.00,0.00" widget="point"/>
<port name="point2" range="value" type="point" value="100.00,100.00" widget="point"/>
</node>
<node description="Calculate the average of a list of numbers." function="math/average" image="average.png" name="average" outputType="float" position="7.00,3.00">
<node description="Calculate the average of a list of numbers." function="math/average" image="average.png" name="average" outputType="float" position="7.00,3.00" category="math">
<port name="values" range="list" type="float" value="0.0" widget="float"/>
</node>
<node description="Select between two values by comparing them." function="math/compare" image="compare.png" name="compare" outputType="float" position="7.00,4.00">
<node description="Select between two values by comparing them." function="math/compare" image="compare.png" name="compare" outputType="float" position="7.00,4.00" category="math">
<port name="comparator" range="value" type="string" value="&lt;" widget="menu">
<menu key="&lt;" label="smaller than"/>
<menu key="&gt;" label="greater than"/>
Expand All @@ -28,7 +28,7 @@
<port name="value1" range="value" type="float" value="0.0" widget="float"/>
<port name="value2" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Convert a value from one range to another" function="math/convertRange" image="generic.png" name="convert_range" outputType="float" position="7.00,6.00">
<node description="Convert a value from one range to another" function="math/convertRange" image="generic.png" name="convert_range" outputType="float" position="7.00,6.00" category="math">
<port name="value" range="value" type="float" value="50.0" widget="float"/>
<port name="source_start" range="value" type="float" value="0.0" widget="float"/>
<port name="source_end" range="value" type="float" value="100.0" widget="float"/>
Expand All @@ -41,97 +41,97 @@
<menu key="clamp" label="Clamp"/>
</port>
</node>
<node description="Calculate a new point based on the angle and distance from an original point." function="math/coordinates" image="coordinates.png" name="coordinates" outputType="point" position="4.00,10.00">
<node description="Calculate a new point based on the angle and distance from an original point." function="math/coordinates" image="coordinates.png" name="coordinates" outputType="point" position="4.00,10.00" category="geometry">
<port name="position" range="value" type="point" value="0.00,0.00" widget="point"/>
<port name="angle" range="value" type="float" value="0.0" widget="float"/>
<port name="distance" range="value" type="float" value="100.0" widget="float"/>
</node>
<node description="Calculate the trigonometric cosine of an angle" function="math/cos" image="generic.png" name="cos" outputType="float" position="10.00,1.00">
<node description="Calculate the trigonometric cosine of an angle" function="math/cos" image="generic.png" name="cos" outputType="float" position="10.00,1.00" category="math">
<port name="value" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Convert radians to degrees." function="math/degrees" image="generic.png" name="degrees" outputType="float" position="13.00,4.00">
<node description="Convert radians to degrees." function="math/degrees" image="generic.png" name="degrees" outputType="float" position="13.00,4.00" category="math">
<port name="radians" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Calculate the distance between two points." function="math/distance" image="distance.png" name="distance" outputType="float" position="10.00,5.00">
<node description="Calculate the distance between two points." function="math/distance" image="distance.png" name="distance" outputType="float" position="10.00,5.00" category="math">
<port name="point1" range="value" type="point" value="0.00,0.00" widget="point"/>
<port name="point2" range="value" type="point" value="100.00,100.00" widget="point"/>
</node>
<node description="Divide two numbers." function="math/divide" image="divide.png" name="divide" outputType="float" position="7.00,5.00">
<node description="Divide two numbers." function="math/divide" image="divide.png" name="divide" outputType="float" position="7.00,5.00" category="math">
<port name="value1" range="value" type="float" value="0.0" widget="float"/>
<port name="value2" range="value" type="float" value="1.0" widget="float"/>
</node>
<node description="Calculate the natural logarithm of a value" function="math/log" image="log.png" name="log" outputType="float" position="7.00,8.00">
<node description="Calculate the natural logarithm of a value" function="math/log" image="log.png" name="log" outputType="float" position="7.00,8.00" category="math">
<port min="0.01" name="value" range="value" type="float" value="1.0" widget="float"/>
</node>
<node description="Transform a string to a list of numbers." function="math/makeNumbers" image="generic.png" name="make_numbers" outputType="float" outputRange="list" position="13.00,2.00">
<node description="Transform a string to a list of numbers." function="math/makeNumbers" image="generic.png" name="make_numbers" outputType="float" outputRange="list" position="13.00,2.00" category="math">
<port name="string" range="value" type="string" value="11;22;33" widget="string"/>
<port name="separator" range="value" type="string" value=";" widget="string"/>
</node>
<node description="Select the maximum value of a list of numbers." function="math/max" image="max.png" name="max" outputType="float" position="7.00,2.00">
<node description="Select the maximum value of a list of numbers." function="math/max" image="max.png" name="max" outputType="float" position="7.00,2.00" category="math">
<port name="values" range="list" type="float" value="0.0" widget="float"/>
</node>
<node description="Select the minimum value of a list of numbers." function="math/min" image="generic.png" name="min" outputType="float" position="7.00,1.00">
<node description="Select the minimum value of a list of numbers." function="math/min" image="generic.png" name="min" outputType="float" position="7.00,1.00" category="math">
<port name="values" range="list" type="float" value="0.0" widget="float"/>
</node>
<node description="Calculate the modulo: divide two numbers and keep the remainder." function="math/mod" image="mod.png" name="mod" outputType="float" position="4.00,6.00">
<node description="Calculate the modulo: divide two numbers and keep the remainder." function="math/mod" image="mod.png" name="mod" outputType="float" position="4.00,6.00" category="math">
<port name="value1" range="value" type="float" value="0.0" widget="float"/>
<port name="value2" range="value" type="float" value="1.0" widget="float"/>
</node>
<node description="Multiply two numbers." function="math/multiply" image="multiply.png" name="multiply" outputType="float" position="4.00,5.00">
<node description="Multiply two numbers." function="math/multiply" image="multiply.png" name="multiply" outputType="float" position="4.00,5.00" category="math">
<port name="value1" range="value" type="float" value="0.0" widget="float"/>
<port name="value2" range="value" type="float" value="1.0" widget="float"/>
</node>
<node description="Negate the number. Changes the sign of a number." function="math/negate" image="generic.png" name="negate" outputType="float" position="13.00,5.00">
<node description="Negate the number. Changes the sign of a number." function="math/negate" image="generic.png" name="negate" outputType="float" position="13.00,5.00" category="math">
<port name="value" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Create a floating-point number which you can use as a variable." function="math/number" image="generic.png" name="number" outputType="float" position="1.00,1.00">
<node description="Create a floating-point number which you can use as a variable." function="math/number" image="generic.png" name="number" outputType="float" position="1.00,1.00" category="math">
<port name="value" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Convert degrees to radians." function="math/radians" image="generic.png" name="radians" outputType="float" position="13.00,3.00">
<node description="Convert degrees to radians." function="math/radians" image="generic.png" name="radians" outputType="float" position="13.00,3.00" category="math">
<port name="degrees" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Create a list of random numbers." function="math/randomNumbers" image="generic.png" name="random_numbers" outputType="float" outputRange="list" position="13.00,1.00">
<node description="Create a list of random numbers." function="math/randomNumbers" image="generic.png" name="random_numbers" outputType="float" outputRange="list" position="13.00,1.00" category="math">
<port min="0.0" name="amount" range="value" type="int" value="10" widget="int"/>
<port name="start" range="value" type="float" value="0.0" widget="float"/>
<port name="end" range="value" type="float" value="100.0" widget="float"/>
<port name="seed" range="value" type="int" value="0" widget="int"/>
</node>
<node description="Generate a range of numbers." function="math/range" image="generic.png" name="range" outputType="float" outputRange="list" position="10.00,2.00">
<node description="Generate a range of numbers." function="math/range" image="generic.png" name="range" outputType="float" outputRange="list" position="10.00,2.00" category="math">
<port name="start" range="value" type="float" value="0.0" widget="float"/>
<port name="end" range="value" type="float" value="10.0" widget="float"/>
<port name="step" range="value" type="float" value="1.0" widget="float"/>
</node>
<node description="Calculate a new point based on the angle and distance from an original point." function="math/reflect" image="generic.png" name="reflect" outputType="point" position="4.00,11.00">
<node description="Calculate a new point based on the angle and distance from an original point." function="math/reflect" image="generic.png" name="reflect" outputType="point" position="4.00,11.00" category="geometry">
<port name="point1" range="value" type="point" value="0.00,0.00" widget="point"/>
<port name="point2" range="value" type="point" value="100.00,100.00" widget="point"/>
<port name="distance" range="value" type="float" value="100.0" widget="float"/>
<port name="angle" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Generate a certain amount of numbers." function="math/sample" image="generic.png" name="sample" outputType="float" outputRange="list" position="10.00,3.00">
<node description="Generate a certain amount of numbers." function="math/sample" image="generic.png" name="sample" outputType="float" outputRange="list" position="10.00,3.00" category="math">
<port min="0.0" name="amount" range="value" type="int" value="10" widget="int"/>
<port name="start" range="value" type="float" value="0.0" widget="float"/>
<port name="end" range="value" type="float" value="100.0" widget="float"/>
</node>
<node description="Calculate the trigonometric sine of an angle" function="math/sin" image="generic.png" name="sin" outputType="float" position="4.00,8.00">
<node description="Calculate the trigonometric sine of an angle" function="math/sin" image="generic.png" name="sin" outputType="float" position="4.00,8.00" category="math">
<port name="value" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Test node that takes 1 second to calculate a number." function="math/slowNumber" image="generic.png" name="slow_number" outputType="float" position="13.00,8.00">
<node description="Test node that takes 1 second to calculate a number." function="math/slowNumber" image="generic.png" name="slow_number" outputType="float" position="13.00,8.00" category="math">
<port name="value" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Calculate the square root of a number." function="math/sqrt" image="sqrt.png" name="sqrt" outputType="float" position="7.00,7.00">
<node description="Calculate the square root of a number." function="math/sqrt" image="sqrt.png" name="sqrt" outputType="float" position="7.00,7.00" category="math">
<port name="value" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Subtract two numbers." function="math/subtract" image="subtract.png" name="subtract" outputType="float" position="4.00,4.00">
<node description="Subtract two numbers." function="math/subtract" image="subtract.png" name="subtract" outputType="float" position="4.00,4.00" category="math">
<port name="value1" range="value" type="float" value="0.0" widget="float"/>
<port name="value2" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Sum a list of numbers." function="math/sum" image="sum.png" name="sum" outputType="float" position="4.00,3.00">
<node description="Sum a list of numbers." function="math/sum" image="sum.png" name="sum" outputType="float" position="4.00,3.00" category="math">
<port name="values" range="list" type="float" value="0.0" widget="float"/>
</node>
<node description="Calculate a value as an integer" function="math/toInteger" image="generic.png" name="to_integer" outputType="int" position="4.00,7.00">
<node description="Calculate a value as an integer" function="math/toInteger" image="generic.png" name="to_integer" outputType="int" position="4.00,7.00" category="math">
<port name="value" range="value" type="float" value="0.0" widget="float"/>
</node>
<node description="Calculate a value based from wave inputs." function="math/wave" image="generic.png" name="wave" outputType="float" position="10.00,6.00">
<node description="Calculate a value based from wave inputs." function="math/wave" image="generic.png" name="wave" outputType="float" position="10.00,6.00" category="math">
<port name="min" range="value" type="float" value="0.0" widget="float"/>
<port name="max" range="value" type="float" value="100.0" widget="float"/>
<port name="speed" range="value" type="float" value="60.0" widget="float"/>
Expand Down

0 comments on commit 27ba732

Please sign in to comment.