I made a math vector class for thinBasic. It is focused on ease of use rather than efficiency. I based a lot of the methods of the class from the Processing language, hope that it might bring more users to thinBasic. Because of name conflicts in thinBasic I had to change my method names, but the functional use is there. You can download a zip from github here:
https://github.com/kryton9/thinBasic-cVec
cVec.tbasicu is the include file needed to use this class.
cVecUnitTests.tbasic is a complete unit test of this class. A good way to see the use of all the methods.
testcVecOutMethod.tbasic is a test focused more in depth on the out method of the class.
all tests green thanks to Primo
cVecTests.jpg
You don't need Git to use these files. Just follow the link and click on the following to download a zip file of all the needed code:
Click image for larger version.
gitUse.jpg
Bookmarks