Formally, yes. you will need something like that as a prerequisite. And really- it can only help. but the way it was phrased, it appears that this was an "informal" recommendation:
He mentioned that if I want to learn programming, I should learn trigonometry.
in my mind, I see a conversation like this:
"hey, I want to learn programming."
"oh really? Well, I think, you should learn trigonometry first."
which is completely baseless; there is no statement of pre-requisites, which their certainly will be- it was basically saying, "well, you need to know trig before you can take programming! Everybody knows you can't parse a string without knowing the Sine Laws!".
Also, completely OT but I personally find formal degrees meaningless. I've met people that supposedly have CS degrees who are about as intelligent as a cantaloupe, and would certainly find competition from one. Now, this obviously is not the case for everybody who goes through it, but it's pretty redundant- the way software is written in academia is a lot different from the way it really is.
Higher or basic mathematics train you to think logically in developing programs.
I see what you mean here... but that isn't really strictly true; the mindset of a mathematician does not necessarily mean they would be a good programmer, for example.
What's important is analytical thinking and, basically, using a set of tools (functions, statements, control structures) to perform a specific task. This is the easy part. What's important then is finding ways to make it go faster.
A example might be sorting; almost any person who took even the most basic programming course can probably write a bubble sort function in some language; it's really quite basic, and the code flow is easy to follow.
But even programmers in the industry have trouble writing a quick-sort, ot shell-sort function. why? well, for many languages, such as python, sorting has become an atomic action. Sure, understanding the concepts behind it is important, but for most cases, it's enough to know that it sorts. It's not important How it sorts.
Academia finds all sorts of esoteric methods of sorting- this is how the quicksort (or my favourite, the shell sort) came about- through intense study of the problem. However, it's important to realize that the same skills do not necessarily translate to financially sustainable programming in all scenarios.
Basically- I feel that programming is not something that everybody can learn, regardless of the courses taken. Certainly anybody can take a programming course; but that doesn't make anybody a good (or even a mediocre) programmer any more then, say, a course in psychology can make a person a good psychologist. There are a number of different personality traits and aptitudes that are important in becoming a programmer, just as there are a number of important personality traits and aptitudes to becoming a psychologist.
What ends up happening is that the wrong people might want to work in the industry, and they can, but they will have larger barriers to overcome them people who "have the knack" for it.
What does this have to do with the topic? Well, actually, I forgot. Oh well.