I am good at math

Started by
33 comments, last by Micromania 21 years, 3 months ago
I dont want to toot my horn but I am good at math but I am having a problem using this in programing. I dont see how cout and cin will benifit form csc (thetha) = 1/cos or r x r = a x a + b x b - 2 x cos(c). I am good at trig because I decided to take advanced trig in school. But I dont see how programming can use this math since there is no way to even get a square root of a number in a compiler. there is no square root operation. I think.
Advertisement
I''m not a programmer by any means, but I remember math.h having sqrt().
... What on Earth do the cout and cin objects have to do with trigonometry? And, for that matter, what does this post have to do with anything at all?

Incidentally, Shotokan is right.
Cin and cout have nothing to do with math.. They are just a way to put some text on the screen..

And saying that you are good in math but can''t find a way to apply it to programming is just stupid.. Read before you post

Matrices and vectors will be the things you will use in programming.

Ever thougt how to calculate if an object existing out connected points is within you viewing frustrum? You will defenitely use some math in that

Learn more and you will use your math.
"Ever thougt how to calculate if an object existing out connected points is within you viewing frustrum? You will defenitely use some math in that"

I will give it a shot.

Cant you draw a vector to any object which is outside your view and see if it intersects your cameras rotational view or if it fits within the view distance of your camera
this thread is funny
I''ve seen many stupid threads.. but this one is defenitely in the top 10 :D

Micromania, learn how to programm. Then learn math and after that learn how to apply them..

To check if an object is in your viewing frustrum you could use a bounding sphere and then check if it lies within the planes that form your piramid(frustrum). You will need things like the crossproduct for that..

But pleace, first learn programming and don''t start shouting when the cin/cout functions for a console programming don''t give you the opportunity to use your math knowledge..
Micromania, your post indicates just that you want to let everyone know that you have learnt something that seems extremely difficult. Congratulations! You''re good in math. But scolding iostream.h library for YOU can''t use it, isn''t best way to show off...
Try to make a small program, and send in only those questions you''re interested in and only after you''ve thoungt of.
You can continue boasting, but hardly will this lead to good result...

P.S.
in C++, math.h has sqrt() for square roots, pow(x,n) for x^n and many other functions. They return you a value. cout, cin - are standart streams. You can "plug" that returned value, say in cout stream, to display it on the screen.
It''s important to remember that no matter how good you are at something, there''s always someone who''s better!

Unless you''re John Carmack.
Setting everything else aside (because I don't like repeating what others already said), if you claim to be good at math and then can't calculate the square root of a simple real value sounds a bit ... well, weird. I could have understood asking what would be a sensible error to stop the iteration, but every sensible mathematician should be able to produce a simple algorithm needing nothing more than variables of type float (or double) and the standard operators for these types. Not efficient, but definately something that works.

[edited by - BitMaster on December 26, 2002 10:57:22 AM]

This topic is closed to new replies.

Advertisement