If you like to know how I came up with the algorithm for this code, look into this pdf file, please.
If you are interested in downloading a
1,092 KB Excel 2010 © sample file which contains the function discussed here, go to my Download page, please.
Please notice that sbRandTrigen needs and calls sbRandTriang!
You might want to compare this implementation to the VBAExpress version TrigenVB.