RE: Bezier curve formula in C++
The statement that computes your formula doesn't alter "t", so you can simply "cout << t" before or after "ans", or do whatever you want with it. It's just a variable.
I should also note that in your code, "t" is never initialized to anything before it is used, which is almost certainly a mistake.
|