Thread: C++ & Math

Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    tedi20233's Avatar
    Join Date
    Sep 2017
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    2
    My Mood
    Cool

    Question C++ & Math

    Quick Question: Im 16 years old student who is bad at maths but want to learn programing and software engineering ! Can i learn C++ without math or other langueges ?

  2. #2
    MikeRohsoft's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Los Santos
    Posts
    797
    Reputation
    593
    Thanks
    26,314
    for me programming have less to do with math, i'm not very good in math aswell.
    The programs themself and how they works, have alot to do with math and depeding on what u want to do, u need to calculate something here and there, but in core i would say, you can learn C++ without being good in math. Some calculations like units * sizeofUnits you can not avoid, but u dont need even to know the result xD

  3. The Following User Says Thank You to MikeRohsoft For This Useful Post:

    tedi20233 (11-18-2018)

  4. #3
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,993
    Reputation
    374
    Thanks
    8,808
    My Mood
    Twisted
    Maths and programming share a similar way of thinking, so if you can't wrap you head around how math even works you're going to have a hard time learning programming. That does not mean it's impossible, it might even make you good at math. When it comes to how much math you actually need in programming it depends on what you're programming. If you're aiming for physics or game development then math is fundamental. For everything else it's more or less just basic arithmetic.

  5. #4
    MrGotsSkillz's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    Hehe xd
    Posts
    1,189
    Reputation
    35
    Thanks
    91
    My Mood
    Doh
    I agree with @Biesi I've heard that other things require more math than others for example mobile development i heard does not require as much math as lets say creating a game. So it really depends on what your going for

  6. #5
    tedi20233's Avatar
    Join Date
    Sep 2017
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    2
    My Mood
    Cool
    Quote Originally Posted by Biesi View Post
    Maths and programming share a similar way of thinking, so if you can't wrap you head around how math even works you're going to have a hard time learning programming. That does not mean it's impossible, it might even make you good at math. When it comes to how much math you actually need in programming it depends on what you're programming. If you're aiming for physics or game development then math is fundamental. For everything else it's more or less just basic arithmetic.
    Thank for the reply buttttt ... What kind of math is needed in game developing or in general in any program languege ? Like if i want to make a website for example

    I also have good memory if that can help me in any way im bulgarian and i only learn english from youtube videos
    Last edited by tedi20233; 11-18-2018 at 02:16 PM.

  7. #6
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,993
    Reputation
    374
    Thanks
    8,808
    My Mood
    Twisted
    Quote Originally Posted by tedi20233 View Post
    What kind of math is needed in game developing or in general in any program languege ? Like if i want to make a website for example
    Depends on the kind of website again. If it's math related it requires more math. When it's not, then you're good with calculating margins and boundaries that are just simple arithmetic operations like 1200 - 5 * 20. For game development it can ramp up to complex matrix stuff as well as 3D calculations. It also makes a difference whether you're using an existing game engine that has the math stuff already implemented or whether you're creating your own engine and have to calculate the distance between two points in three dimensional space (e.g.). Nothing you wouldn't be able to look up, but you need to understand concepts and basics of math.
    Last edited by Biesi; 11-19-2018 at 01:10 PM.

  8. #7
    Demon's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    Lost
    Posts
    1,095
    Reputation
    86
    Thanks
    316
    My Mood
    Angelic
    I don't recommend you start with C++ if it's your first language. As C++ is one of the harder ones to learn and get a grasp of. Learn some easier languages like C# / Java etc. And yes, Math is extremely important for when you get into complex algorithm and what not.
    Nice

  9. #8
    Vendetta's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    Romania
    Posts
    862
    Reputation
    10
    Thanks
    85
    My Mood
    Fine
    Math has nothing to do with programming. Just because you need to know basic math (divisibility, addition and subtraction, arrays etc) it doesn't mean you need math in order to code. You don't need mathematical formulas and knowing how to solve equations in order to develop a game for example.

  10. The Following User Says Thank You to Vendetta For This Useful Post:

    MikeRohsoft (11-25-2018)

  11. #9
    notquin's Avatar
    Join Date
    Sep 2018
    Gender
    male
    Posts
    46
    Reputation
    10
    Thanks
    8
    Quote Originally Posted by Vendetta View Post
    Math has nothing to do with programming. Just because you need to know basic math (divisibility, addition and subtraction, arrays etc) it doesn't mean you need math in order to code. You don't need mathematical formulas and knowing how to solve equations in order to develop a game for example.
    I disagree. If you don't have a solid foundation of math, I can think of several areas you will struggle with in programming. Sure, if all you intend of ever making is 50 line console applications then you can get away without knowing any math, but anything that actually does something usefull uses math in some way or form.

    Also stating that math has nothing to do with programming is like stating physics has nothing to do with engineering. It's ignorant and just flat out wrong.

  12. #10
    Vendetta's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    Romania
    Posts
    862
    Reputation
    10
    Thanks
    85
    My Mood
    Fine
    Quote Originally Posted by notquin View Post
    I disagree. If you don't have a solid foundation of math, I can think of several areas you will struggle with in programming. Sure, if all you intend of ever making is 50 line console applications then you can get away without knowing any math, but anything that actually does something usefull uses math in some way or form.

    Also stating that math has nothing to do with programming is like stating physics has nothing to do with engineering. It's ignorant and just flat out wrong.
    Even in algorithmic c++ you only need basic math, nothing special. You don't need logarithms, equations or formulas

  13. #11
    notquin's Avatar
    Join Date
    Sep 2018
    Gender
    male
    Posts
    46
    Reputation
    10
    Thanks
    8
    Quote Originally Posted by Vendetta View Post
    Even in algorithmic c++ you only need basic math, nothing special. You don't need logarithms, equations or formulas
    I'm assuming when say "basic math" you are referring to basic arthimetic such as addition and multiplication.

    I can think of several fields where having knowledge of concepts such as linear algebra, probability, set theory and number theory are essential. These forms of math certainly don't fall under the concept your "basic math." Ill say it again, if your working on basic programs as a hobby then sure, having no grasp of math could be fine.

  14. The Following User Says Thank You to notquin For This Useful Post:

    MikeRohsoft (11-26-2018)

  15. #12
    MikeRohsoft's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Los Santos
    Posts
    797
    Reputation
    593
    Thanks
    26,314
    Quote Originally Posted by notquin View Post
    I'm assuming when say "basic math" you are referring to basic arthimetic such as addition and multiplication.

    I can think of several fields where having knowledge of concepts such as linear algebra, probability, set theory and number theory are essential. These forms of math certainly don't fall under the concept your "basic math." Ill say it again, if your working on basic programs as a hobby then sure, having no grasp of math could be fine.
    Thanks for the laughts ^^
    I work since years as Developer in different companys with completly different Tasks to do, but none of those required some, of your math cases.
    So it's just not true, that it counts only for hobby programmers.

  16. #13
    bamanam's Avatar
    Join Date
    Aug 2018
    Gender
    male
    Posts
    196
    Reputation
    10
    Thanks
    4
    yeah depends on what you mean by mathematics.
    https://en.wikipedia.org/wiki/Boolean_algebra

    as for game developing, you probably need basic high school stuff. like pythagoras theorem, trigonometry, linear algebra. those are the only ones i can think of on the top of my head. you might also need interpolation depending on what you're doing for smoothness - or u can just steal those off peoples ******

  17. #14
    notquin's Avatar
    Join Date
    Sep 2018
    Gender
    male
    Posts
    46
    Reputation
    10
    Thanks
    8
    Quote Originally Posted by MikeRohsoft View Post


    Thanks for the laughts ^^
    I work since years as Developer in different companys with completly different Tasks to do, but none of those required some, of your math cases.
    So it's just not true, that it counts only for hobby programmers.
    Sure general development positions such as full stack probably don't use math in there day to day work but try getting a position in cryptography, machine learning or data analysis without a firm understanding of concepts more advanced than basic arithmetic and you're going to struggle.
    Last edited by notquin; 11-26-2018 at 09:45 AM.

  18. #15
    MikeRohsoft's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Los Santos
    Posts
    797
    Reputation
    593
    Thanks
    26,314
    Quote Originally Posted by notquin View Post
    Sure general development positions such as full stack probably don't use math in there day to day work but try getting a position in cryptography, machine learning or data analysis without a firm understanding of concepts more advanced than basic arithmetic and you're going to struggle.
    I also made for private cheats things like Aimbot, ESP and implented an self written aes encryption and base64 encoding and even there is very very less math required. And that little bit math that is required is even documentated somewhere.
    The most difficult calculations i ever had to do, was world 2 screen
    Code:
    	bool	world_to_screen(v3 pos, v2& out)
    	{
    		v3	tmp;
    
    		float*		viewMatrix	= CHooking::m_viewPort->fViewMatrix;
    
    		tmp.x	= (viewMatrix[0] * pos.x) + (viewMatrix[4] * pos.y) + (viewMatrix[8] * pos.z) + viewMatrix[12];		//row 2
    		tmp.y	= (viewMatrix[1] * pos.x) + (viewMatrix[5] * pos.y) + (viewMatrix[9] * pos.z) + viewMatrix[13];	//row 3
    		tmp.z	= (viewMatrix[2] * pos.x) + (viewMatrix[6] * pos.y) + (viewMatrix[10] * pos.z) + viewMatrix[14];	//row 4
    
    		if(tmp.z < 0.001f)
    			return false;
    
    		tmp.z = 1.0f / tmp.z;
    
    		tmp.x *= tmp.z;
    		tmp.y *= tmp.z;
    
    		int32_t	w	= (int32_t) CHooking::m_resolution->w,
    				h	= (int32_t) CHooking::m_resolution->h;
    
    		out.x	= ((w / 2.f) + (.5f * tmp.x * w + 1.f)) / w;
    		out.y	= ((h / 2.f) - (.5f * tmp.y * h + 1.f)) / h;
    
    		if(out.x > 1.f || out.x < 0.f || out.y > 1.f || out.y < 0.f)
    			return false;
    		return true;
    	}
    and guess what. even this calculation is to find and if not.. it's Mult, Div, Add and Sub nothing special.
    But maybe we 2 have just a different defintion of "Math".
    For me, even Regular Expressions are not math, but they are technically even part of math.
    Just pattern match scanners.

Page 1 of 2 12 LastLast

Similar Threads

  1. I just ownd my math test =P
    By radnomguywfq3 in forum General
    Replies: 29
    Last Post: 11-01-2007, 11:56 AM
  2. Math Test
    By radnomguywfq3 in forum Flaming & Rage
    Replies: 2
    Last Post: 10-31-2007, 02:07 PM
  3. Hardest Math problem in the world
    By iverson954360 in forum General
    Replies: 10
    Last Post: 08-13-2007, 12:35 AM
  4. What you know about math?
    By arunforce in forum General
    Replies: 2
    Last Post: 04-07-2007, 07:47 AM
  5. This is what math class does to you
    By apitite.for.distruction in forum Art & Graphic Design
    Replies: 14
    Last Post: 10-28-2006, 11:44 AM

Tags for this Thread