#### Archived

This topic is now archived and is closed to further replies.

# I am good at math

## Recommended Posts

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.

##### Share on other sites
I''m not a programmer by any means, but I remember math.h having sqrt().

##### Share on other sites
... 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.

##### Share on other sites
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

##### Share on other sites
"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

##### Share on other sites
this thread is funny

##### Share on other sites
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..

##### Share on other sites
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.

##### Share on other sites
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.

##### Share on other sites
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]

##### Share on other sites
In more advanced x86 cpus, there is a SQRT instruction.

If you want to get the sqrt of something yourself; go grab a math book and learn how to apply newtons method.

That reportedly is the fasted sqrt known to man.
There was a post about fast sqrt and Carmack wrote a routine based on it in the Q3 code.

Your question appears rather irrelevant, by the way: its ringing up "no sale" in my language processing facility.

Bugle4d

##### Share on other sites
Mr. graham (moderator), this is first time i ask such thing, and i hope last time also: please DELETE this thread... i''m getting mad of it...

tnx.

##### Share on other sites
quote:
Original post by Anonymous Poster
Mr. graham (moderator), this is first time i ask such thing, and i hope last time also: please DELETE this thread... i''m getting mad of it...

Awww... come on, leave it up! It make me feel smart!

##### Share on other sites
I thought about it twice... and the poster obviously doesn''t know enough to intertwine the two (programming AND math).

If by any chance YOU, the poster, is still reading this thread, please keep in mind that even advanced Trig is EASY. All math is easy if you understand the underlying concepts!

Can anyone agree with me?

Like many others suggest, please pick up a programming book (or two), and then when your done with your trig class, move on to calculus (if you think you are good with everything else).

Please don''t ever rip down my language of choice because you can do ANYTHING in C++. And in any other language for that matter! If you can think it, (and you have enough imagination and APPLIABLE knowledge) then you can create it.

And that concludes the end of my frustration session.
Thank you and have a nice day.

P.S. Bragg''n is not a great way to make friends. Especially when you can''t prove yourself.

-Lewis [m80]
Play QUADz MX @
www.m80produxions.com

##### Share on other sites
quote:
Original post by Vlion
In more advanced x86 cpus, there is a SQRT instruction.
I''m aware of FSQRT. Is there a SQRT as well, or were you thinking of FSQRT?

##### Share on other sites
I agree at 200%. Both programming and math are easy to understand, provided that you have the necessary basis. The problem is, each of them has it''s own, hard-to-understant basis.

ToohrVyk
-------------
Extatica - a free 3d game engine
Available soon!

##### Share on other sites
LewieM80, You''re absolutely right! Actually math is logical. Programming is logical. If one understands WHAT he wants to do he WILL do it. What about the "hard-to-understand-basis", that ToohrVyk mentioned, actually it is difficult to understand only because one simply doesn''t realize what he needs it for. But when making certain project, that is when you are aimed at something, you''ll unterstand the topic, no matter how difficult it is! (exaplme: i had no idea what for i studied algebra: those matrices, basises and other stuff... until i had to rotate one vector around the other in 3D!)

##### Share on other sites
quote:

All math is easy if you understand the underlying concepts!

I would agree that this is true for computational-based Mathematics, but not proof-based Mathematics, such as Real Analysis, Abstract Algebra, Topology, etc.

##### Share on other sites
I agree. To say mathematics is easy only shows you haven''t read very much mathematics. Try to prove the four color theorem or Fermat’s last theorem and then come back and tell how easy it was...

##### Share on other sites
Who ever said Cin and cout have nothing to do with math.. They are just a way to put some text on the screen..
is an idiot!!!

##### Share on other sites
quote:
Original post by Anonymous Poster
I agree. To say mathematics is easy only shows you haven''t read very much mathematics. Try to prove the four color theorem or Fermat’s last theorem and then come back and tell how easy it was...

They still haven''t proved the four color theorem? The last thing my teacher tolled me was that they used a couple computers and lett them color maps.. After a few million(don''t now how much..) they said it was ''proven''..

##### Share on other sites
quote:
Original post by trekey19966
Who ever said Cin and cout have nothing to do with math.. They are just a way to put some text on the screen..
is an idiot!!!

If you will explain why I am an idiot acording to you we could talk further.

I think you got what I said to the guy.. The way cin/cout actually works has something to do with math but I think you understand what I meand with that phrase

##### Share on other sites
this thread is full of funny!!!

##### Share on other sites
quote:
Original post by Scheermesje
They still haven''t proved the four color theorem? The last thing my teacher tolled me was that they used a couple computers and lett them color maps.. After a few million(don''t now how much..) they said it was ''proven''..

The four color theorem is claimed to be proven (as is Fermat''s last theorem) but the use of computer programs to carry out parts of the proof is quite controversial indeed.

##### Share on other sites
Those who claim that math is difficult:

I hope you understand, that you are in math & physics forum on gamedev.net - read the description of the forum, please... what for i need to proove 4 color theorem? how can i apply the way one prooves it to games?
The math YOU talk about is quite different and interesting question...
But the math used in games - is preety easy to understand. That what we mean.

Cheers!

• ### Forum Statistics

• Total Topics
628333
• Total Posts
2982126

• 24
• 9
• 9
• 13
• 11