Skip to main content
added 9 characters in body; edited tags; edited title
Source Link
user744
user744

What's the best way to write fade in out loop in c++function?

I want to create a continuous fade in and out. e.g suppose f(x) is x. First i want

I'd like to increase it's valuehave some function F(time) that returns values increasing from 0 to 255 and, then decrease itfrom 255 back down to -255 step by step, and then increase it back to 255repeats, as time progresses.

What's the best way to write fade in out loop in c++?

I want to create a continuous fade in and out. e.g suppose f(x) is x. First i want to increase it's value to 255 and then decrease it back to -255 step by step and then increase it back to 255.

What's the best way to write fade in out function?

I want to create a continuous fade in and out.

I'd like to have some function F(time) that returns values increasing from 0 to 255, then from 255 back down to -255, and repeats, as time progresses.

edited title
Link
2600th
  • 1k
  • 1
  • 12
  • 25

What's the best way to code this functionwrite fade in out loop in c++?

Source Link
2600th
  • 1k
  • 1
  • 12
  • 25

What's the best way to code this function in c++?

I want to create a continuous fade in and out. e.g suppose f(x) is x. First i want to increase it's value to 255 and then decrease it back to -255 step by step and then increase it back to 255.