Stepped Gain Values in a Rotary Slider Control

Hi! I am brand new to programming and to JUCE, and I am motivated to create my own EQ. I am trying to create 1 dB gain steps in my gain knob, between ±18 dB, from 0 dB. I’m hoping that there will be no gain values to choose from between than those 1 dB steps. How would I accomplish this task? I thought about creating a list of available gain values in dB, but I don’t know if that would work/be efficient.

Thanks for your help!
Andy