-
Notifications
You must be signed in to change notification settings - Fork 3
kiwi.lang.Math
Math type contains methods for performing basic numeric and trigonometric functions
Description: Returns the greater of two values. Values can be Byte, UByte, Short, UShort, Long, Ulong, Integer, UInteger, LongInt, ULongInt, Single and Double
Example Code:
#include once "kiwi\kiwi.bi"
Dim a as Double, b as Double
a = 3.14
b = 7.77
print Math.min(a, b)
Description: Returns the greater of two values. Values can be Byte, UByte, Short, UShort, Long, Ulong, Integer, UInteger, LongInt, ULongInt, Single and Double
Example Code:
#include once "kiwi\kiwi.bi"
Dim a as Double, b as Double
a = 3.14
b = 7.77
print Math.max(a, b)
Description: Returns a double value with a positive sign, greater than or equal to 0 and less than 1.
Example Code:
#include once "kiwi\kiwi.bi"
' Print a random number greater than or equal to 0 and less than 1
print Math.random()
' Print a random number greater than or equal to 200 and less than 400
Dim min as Integer = 200
Dim max as Integer = 400
print Math.random() * (max - min + 1) + min
Description: Math.E value is the value that is closer than any other to "e", the base of the natural logarithms. Example Code:
#include once "kiwi\kiwi.bi"
' Prints "e", the base of the natural logarithms
print Math.E
Description: Math.Pi value is the value that is closer than any other to "pi", the ratio of the circumference of a circle to its diameter. Example Code:
#include once "kiwi\kiwi.bi"
' Prints "PI", the ratio of the circumference of a circle to its diameter
print Math.PI
- MySQL/MariaDB - Coming to v1.0.2
- ArrayList
- Comparator
- HashMap - Coming to v1.0.2
- Queue