Core API Reference: Number Conversion

From Color Infection Wiki

Jump to: navigation, search


Contents

Number to String

Convert a number value to a string.

Input Parameters:

The Number
the number

Output Parameters:

Result
the result string
Number to Fixed String

Convert a number value to a string with specified number of fraction digits.

Input Parameters:

The Number
the number
Number of Fraction Digits
how many fraction digits

Output Parameters:

Result
the result string
Number to Precision String

Convert a number value to a string with specified number of precision digits.

Input Parameters:

The Number
the number
Number of Precision Digits
how many precision digits

Output Parameters:

Result
the result string
Number to String By Radix

Convert a number value to a string by the specified radix

Input Parameters:

The Number
the number
The radix
the radix, valid value range is [2, 36]

Output Parameters:

Result
the result string
String to Number

Convert a string to a number value

Input Parameters:

String
the input string

Output Parameters:

The Number
the result number
String to Integer By Radix

Convert a string to an integer value

Input Parameters:

String
the input string
The radix
the radix, valid value range is [2, 36]

Output Parameters:

The Integer
the result integer
Degrees to Radians

Convert a degrees to a radians.

Input Parameters:

Degrees
the degrees.

Output Parameters:

Radians
the radians
Radians to Degrees

Convert a radians to a degrees.

Input Parameters:

Radians
the radians.

Output Parameters:

Degrees
the degrees
Color to RGB

Decompose a unsigned int color value to red/green/blue components.

Input Parameters:

Number
the unsigned color value.

Output Parameters:

Red
the red component
Green
the green component
Blue
the blue component
RGB to Color

Get a unsinged int color value from red/green/blue components.

Input Parameters:

Red
the red component, from 0 to 255
Green
the green component, from 0 to 255
Blue
the blue component, from 0 to 255

Output Parameters:

Number
the unsigned color value.
Milliseconds to Minitues:Seconds:Milliseconds

Decompose a milliseconds value to minitues:seconds:milliseconds

Input Parameters:

Milliseconds
the milliseconds

Output Parameters:

Minitues
the minitues
Seconds
the seconds
Milliseconds
the remaining milliseconds, from 0 to 1000 (not include 1000)
Personal tools