From Stefan Xenos · 1996-04-11 02:30 · #73690 in EMULATE
In reply to Support Group by Brian Wisti
-> equasions to solve for any one variable, do implicit differentiation,
-> handle matrix and vector math. Not like I'll ever finish it <grin>, b
-> should be fun to write. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BW> Sounds all too familiar, but at least it is fun. We're sick.
<laugh> A programmer's work is never done. Especially if that programmer happens to be a perfectionist.
BW> programming ever since Applesoft BASIC). The game uses a
BW> pseudo-hexadecimal notation system : 0-9, A-Z.
BW> After fiddling around with some pretty clunky functions, it occured to
BW> me that it could be a class, roughly as follows:
BW> class Rating
BW> {
BW> private :
BW> int value; //numeric value of Rating
BW> char score;//displayed value of Rating
BW> void setScore();//allow for change in Rating's state without forcing
BW> //temporary objects onto the scene
BW> void setVal();//Put this one in for the sheer joy of it
BW> public :
BW> Rating();
BW> Rating(char);
BW> Rating(int);
BW> ~Rating();
BW> Rating operator+(int&);
BW> Rating operator-(int&);
BW> int operator<(int&);
BW> int operator>(int&);
BW> int operator==(int&);
BW> char Score();// sends score value to interested functions
BW> };
BW> I won't go into any further details, mainly because it just occured to
BW> me that I'm rambling.
Actually - I might be able to give you some suggestions, but after looking over your class several times, I'm still not sure exactly what its supposed to do. Is the notation system 0-9, A-Z used somehow internally by the game, or is it only used for input/output purposes? If it's only used for I/O, you probably don't need a special class for storing it - regular integers would do the trick.
BW> But that, to answer your question, is my math
BW> library at this moment. Although I appreciate your offer of crossposting
BW> some additional code, the math _skills_ are essential first.
Well, I haven't even started most of the hard stuff yet. All I've gotten so far is:
- A fixed point real number class (basically a less accurate but
very fast floating point class)
- A 2 and 3-d vector class - supports all standard
vector operations including dot and cross product, and supports
multiplication and division - useful for scaling.
- A real number class which can handle integer operations.
If any of these would come in useful for you, give me a holler.
- Cyclone
--- Maximus/2 3.00
* Origin: Hyper BBS (613)257-7636 (1:163/557.2)