Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Vector module
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
smool




PostPosted: Mon Mar 26, 2012 1:52 pm   Post subject: Vector module

I wrote this because I have been doing alot of math with vectors, and this makes my life really easy. Has most of the basic vector operations, pm me if im missing something.


Vector.tu
 Description:

Download
 Filename:  Vector.tu
 Filesize:  2.9 KB
 Downloaded:  140 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Dreadnought




PostPosted: Mon Mar 26, 2012 3:17 pm   Post subject: Re: Vector module

The MakeUnit function uses a CalcLength function which is on the export list, but otherwise undeclared (I think you meant Magnitude).

Also, the MakeUnit and SetLength functions will crash for a vector with all zero components. (division by zero error)

Finally, the functions PlaneIntersection, Rotate, DrawVector and CalcLength (as mentioned above) are on the export list, but are not present in the module.

Otherwise, nice module!
smool




PostPosted: Mon Mar 26, 2012 5:24 pm   Post subject: Re: Vector module

Sorry, I had cleaned it up a bit from an earlier, messier version. Here is the improved version.


Vector.tu
 Description:

Download
 Filename:  Vector.tu
 Filesize:  2.89 KB
 Downloaded:  127 Time(s)

Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: