[Qt-interest] Implementing QTScript array matrix calculations
Louis Hoefler
louis.hoefler at gmx.de
Fri Aug 27 20:10:09 CEST 2010
Hello everyone,
I am searching a way to implement matrix calculation
operations in QTScript.
I want to be able to do something like this:
ary = new Array();
ary[0] = 2;
ary [1] = 4;
.
result = ary / 2;
result is
result[0] = 1 and result[1] = 2 .
I think, this would only be possible by overloading the / * - + operators.
I don't know whether this is supported.
Another solution I could live with, is to implement child functions
to the Array objects so I would be able to do this:
ary = new Array();
.
result = ary.divide(2);
How could this be done?
Is there a way to add child functions to the array object,
so that these function do not need to be defined in QTScript itself
every time I start a new script?
Thank you, Louis Hoefler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100827/b06df9d0/attachment.html
More information about the Qt-interest-old
mailing list