I am a little bit confused about truncated distributions such as truncated normal distribution. I have a code in FORTRAN where the function gen_rnorm(mean,sigma)
returns random normal value. Now I want to write a code for truncated normal distribution with $a=-3$ and $b=3$. My question is does truncated normal distribution mean that I run the function gen_rnorm(mean,sigma)
and check if the returned value is between $a$ and $b$. If not then ask for another value. Is this what truncated normal distribution means?.
I hope my question makes sense.