echo "### build in functions"; echo "### general maths"; echo "### triginometry (argument in radiads)"; echo "sin(1)="+sin(1); echo "cos(1)="+cos(1); echo "tan(1)="+tan(1); echo "ctg(1)="+ctg(1); echo "asin(1)="+asin(1); echo "acos(1)="+acos(1); echo "atan(1)="+atan(1); echo "### other"; echo "sqrt(2)="+sqrt(2); echo "exp(1)="+exp(1); echo "log(2)="+log(2)+" (natural)"; echo "abs(-1)="+abs(-1); echo "floor(-1.12)="+floor(-1.12); echo "ceil(-1.12)="+ceil(-1.12); echo "round(-1.12)="+round(-1.12); echo "### vector maths"; echo "length((1,1,0))="+length((1,1,0)); echo "normalize((1,1,0))="+normalize((1,1,0))+" returns vector of length()==1 with same direction as argument"; echo "dot((1,2,3),(0,0,3))="+dot((1,2,3),(0,0,3))+" dot product"; echo "cross((1,2,3),(0,0,3))="+cross((1,2,3),(0,0,3))+" cross product"; echo "axes((1,0,0),(0,2,0),(0,0,3))="+axes((1,0,0),(0,1,0),(0,0,3))+" build an axes object from 3 3d vectors"; echo "axes((1,0,0),(0,2,0))="+axes((1,0,0),(0,1,0))+" build an axes object from 2 3d vectors (last vector is a cross product given 2 vectors)"; echo "axes((1,0,0),(0,1,0),2)="+axes((1,0,0),(0,1,0),2)+" build an axes object from 2 3d vectors + length of last vector"; echo "axesLookAt((0,1,0),90)="+axesLookAt((0,1,0),90)+" creates axes which z axis is equal to given vector and rotation, second parameter is axis rotation in DEGREES (around z), useful to make Camera look at given direction"; echo "### size"; echo "size((1,2,3))="+size((1,2,3))+" vector component count"; echo "size((1,2))="+size((1,2))+" vector component count"; echo "size('example string')="+size('example string')+" string characters count"; echo "### varous"; echo "clock()="+clock()+" number of seconds from Kray start"; echo "rand()="+rand()+" pseudorandom number in <0,1) range"; echo "randString()="+randString()+" random string"; echo "replaceString('Ala has a cat','cat','dog')="+replaceString('Ala has a cat','cat','dog'); echo "getEnv('Path')="+getEnv('Path')+" system env variable access (platform dependent)"; echo "md5('apple')="+md5('apple')+" md5 sum"; echo "formatString('now=%now% now=%filename%')="+formatString('now=%now% now=%filename%')+" old formatstring commands replacement"; echo "list of available format codes:"; echo "ver"; "days"; echo "hours"; echo "mins"; echo "secs"; echo "time"; echo "file"; echo "width"; echo "height"; echo "centisecs"; echo "sectime"; echo "kray"; echo "threads"; echo "fgraysmin"; echo "ptime"; echo "build"; echo "now"; echo "fgraysmax"; echo "%"; echo "fileformat"; echo "compiler"; echo "platform"; echo "extension"; echo "frame"; echo "buffer"; echo "br"; echo "arch"; echo "buswidth"; echo "endian"; echo "score"; echo "nowstamp"; echo 'phySkySunDir(53,21,130,14.25,1)='+phySkySunDir(53,21,130,14.25,1)+" Converts geo location + date into sun direction, syntax:"; echo 'phySkySunDir(lattitude, // (0-360)'; echo ' longitude, // (-90,90) south to north'; echo ' julian_day, // (1-365)'; echo ' time_of_day, // (0.0,23.99) 14.25 = 2:15PM'; echo ' time_zone) // (0-23) timezone, east to west, zero based'; echo "min(3,4,6,3,3,6,8,5,3)="+min(3,4,6,3,3,6,8,5,3)+" variable number of double arguments"; echo "max(3,4,6,3,3,6,8,5,3,6,7)="+max(3,4,6,3,3,6,8,5,3,6,7)+" variable number of double arguments"; echo "min((1,2,3)/2)="+min((1,2,3)/2)+" argument is a vector"; echo "max((1,2,3)/2)="+min((1,2,3)/2)+" argument is a vector"; echo ""; echo "%%% . operator (add to operators section)"; echo "<>.x="+<>.x+" x axis from axes object"; echo "(1,2,3).x="+(1,2,3).x+" x coordinate of vector object"; interactive;