Difference between revisions of "SHIP:Sail:Numeric Functions"

From Serious Documentation
Jump to: navigation, search
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<onlyinclude>{{SailFuncTableStart|}}
+
<onlyinclude>
{{:SHIP:Sail:abs}}
+
{{SailFuncTableStart|}}
|+
+
|-{{:SHIP:Sail:abs}}
{{:SHIP:Sail:atoi}}
+
|-{{:SHIP:Sail:argb}}
|+
+
|-{{:SHIP:Sail:atod}}
{{:SHIP:Sail:atof}}
+
|-{{:SHIP:Sail:atof}}
|+
+
|-{{:SHIP:Sail:atoi}}
{{:SHIP:Sail:ceil}}
+
|-{{:SHIP:Sail:atol}}
|+
+
|-{{:SHIP:Sail:bytesToString}}
{{:SHIP:Sail:exp}}
+
|-{{:SHIP:Sail:ceil}}
|+
+
|-{{:SHIP:Sail:codepointToString}}
{{:SHIP:Sail:expm1}}
+
|-{{:SHIP:Sail:dtof}}
|+
+
|-{{:SHIP:Sail:dtoi}}
{{:SHIP:Sail:floor}}
+
|-{{:SHIP:Sail:dtol}}
|+
+
|-{{:SHIP:Sail:exp}}
{{:SHIP:Sail:ftoi}}
+
|-{{:SHIP:Sail:expm1}}
|+
+
|-{{:SHIP:Sail:floor}}
{{:SHIP:Sail:itof}}
+
|-{{:SHIP:Sail:ftod}}
|+
+
|-{{:SHIP:Sail:ftoi}}
{{:SHIP:Sail:log}}
+
|-{{:SHIP:Sail:ftol}}
|+
+
|-{{:SHIP:Sail:indexOf}}
{{:SHIP:Sail:log10}}
+
|-{{:SHIP:Sail:itod}}
|+
+
|-{{:SHIP:Sail:itof}}
{{:SHIP:Sail:log1p}}
+
|-{{:SHIP:Sail:itol}}
|+
+
|-{{:SHIP:Sail:lastIndexOf}}
{{:SHIP:Sail:max}}
+
|-{{:SHIP:Sail:length}}
|+
+
|-{{:SHIP:Sail:log}}
{{:SHIP:Sail:min}}
+
|-{{:SHIP:Sail:log10}}
|+
+
|-{{:SHIP:Sail:log1p}}
{{:SHIP:Sail:pow}}
+
|-{{:SHIP:Sail:ltod}}
|+
+
|-{{:SHIP:Sail:ltof}}
{{:SHIP:Sail:round}}
+
|-{{:SHIP:Sail:ltoi}}
|+
+
|-{{:SHIP:Sail:mapRange}}
{{:SHIP:Sail:sqrt}}
+
|-{{:SHIP:Sail:mapSteinhartHart}}
|+
+
|-{{:SHIP:Sail:max}}
{{:SHIP:Sail:toRadians}}
+
|-{{:SHIP:Sail:min}}
|+
+
|-{{:SHIP:Sail:neg}}
{{:SHIP:Sail:toDegrees}}
+
|-{{:SHIP:Sail:pow}}
|+
+
|-{{:SHIP:Sail:random}}
{{:SHIP:Sail:towards}}
+
|-{{:SHIP:Sail:round}}
 +
|-{{:SHIP:Sail:sqrt}}
 +
|-{{:SHIP:Sail:toDegrees}}
 +
|-{{:SHIP:Sail:toRadians}}
 +
|-{{:SHIP:Sail:toString}}
 +
|-{{:SHIP:Sail:towards}}
 
|}</onlyinclude>
 
|}</onlyinclude>
 
== See Also: ==
 
== See Also: ==
Line 45: Line 50:
 
*[[SHIP:Sail:String Functions|Sail String Functions]]
 
*[[SHIP:Sail:String Functions|Sail String Functions]]
 
*[[SHIP:Sail:Node Functions|Sail Node Functions]]
 
*[[SHIP:Sail:Node Functions|Sail Node Functions]]
*[[SHIP:Sail:Constants|Sail Built-in Constants]]
+
*[[SHIP:Data Types#Constant|Sail Built-in Constants]]

Latest revision as of 17:22, 16 November 2016

Function Returns Introduced Description
abs Integer/Float v4.0 Gets the absolute value of a number
argb Color v5.1.0 Creates a combined color from separate color channels.
atod Double v5.1.0 Parses a String to get a Double from it
atof Float v5.0.120 Parses a String to get an Float from it
atoi Integer v5.0.120 Parses a String to get an Integer from it
atol Long v5.1.0 Parses a String to get an Long from it
bytesToString String v5.0.207 Builds a string from the ASCII bytes of an Integer, Short, or Byte until a 0x00 byte is encountered or the number of bytes of the size of the object are consumed. Optionally, non-printable characters can be replaced as-encountered. All byte orderings are supported.
ceil Integer v5.0 Gets the smallest integer greater than or equal to a number
codepointToString String v4.0 Returns a single character string for the specified Unicode-16 codepoint. If the Codepoint is invalid, the string is empty.
dtof Integer v5.1.0 Explicitly casts an Double to a Float
dtoi Integer v5.0 Casts a Double to an Integer
dtol Long v5.1.0 Casts a Double to a Long
exp Float v5.1.0 Return e to the given power
expm1 Float v5.1.0 Return e to the given power minus 1
floor Integer v5.0 Gets the largest integer less than or equal to a number
ftod Integer v5.1.0 Explicitly casts an Float to a Double
ftoi Integer v5.0 Casts a Float to an Integer
ftol Long v5.1.0 Casts a Float to a Long
indexOf Integer v4.0 Returns the index of the first found occurrence (if any) of a substring within another string, optionally starting at a specified offset. If the substring is not found, -1 is returned.
itod Double v5.1.0 Explicitly casts an Integer to a Double
itof Integer v5.0 Explicitly casts an Integer to a Float
itol Integer v5.0 Explicitly casts an Integer to a Long
lastIndexOf Integer v4.0 Returns the index of the last found occurrence (if any) of a substring within another string, optionally starting at a specified offset. If the substring is not found, -1 is returned.
length Integer v2.0 Returns the length in characters (not bytes) of a string.
log Float v5.1.0 Return the natural log of a number
log10 Float v5.1.0 Return the base 10 log of a number
log1p Float v5.1.0 Return the natural log of a number + 1
ltod Long v5.1.0 Explicitly casts a Long to a Double
ltof Long v5.1.0 Explicitly casts a Long to a Float
ltoi Integer v5.1.0 Explicitly casts a Long to an Integer
mapRange Integer v5.1.0 Maps a number from range A to range B.
mapSteinhartHart Float v5.0.131 Calculates the precise temperature of a thermister.
max Integer/Float v4.0 Gets the maximum value of two or more numbers
min Integer/Float v4.0 Gets the minimum value of two or more numbers
neg Integer/Float v5.1.0 Return the negative of the given number
pow Float v5.1.0 Calculates x to the power of y (x^y)
random Integer v5.1.0 Generate a pseudo random number
round Integer v5.0 Gets the nearest integer to a number
sqrt Float v5.1.0 Calculates the square root of a number (√n)
toDegrees Float v5.1.0 Convert radians to degrees
toRadians Float v5.1.0 Convert degrees to radians
toString String v2.0 Converts an Integer or Float to a string. Options include leading 0 padding, radix, and precision.
towards Float/Integer v5.0.207 Adjusts a number by a percentage in a range towards another number

See Also: