![]() |
![]() |
Script Function ReferenceFunction Reference >Script Function Reference >Table Formats>numberNumberThe number format is a table representing a complex number.
x.type = "number"
Here is an example using the number format.
x.r -- is the real part of the complex number x.i -- is the imaginary part of the complex number
function add(a, b) ret = {} ret.type = "number" ret.r = a.r + b.r ret.i = a.i + b.i return ret end |