This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TinyInt { | |
constructor(N = 0, sign) { | |
this.n = N; | |
switch (sign) { | |
case "unsigned": | |
if (N < 256 && N >= 0 && N % 1 == 0) { | |
return this.n; | |
} else if (N % 1 == 0) { | |
return new Error( | |
"SOLVE ERROR_UNSIGNED_TINYINT: Number OutOfRange (0/255)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function mand(iter:number,complex:number) | |
local znext = 1 | |
local zprev = 1 | |
local itr = iter | |
while (not (itr <= 0)) { | |
znext = (zprev * zprev) + complex | |
zprev = znext | |
itr -= 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mand(reso = 3, complex = 1) { | |
var znext = 1, | |
zprev = 1, | |
iter = reso | |
while (!(iter <= 0)) { | |
znext = zprev * zprev + complex; | |
zprev = znext; | |
iter -= 1; | |
} |