It is surprisingly difficult to create a good
pseudorandom number generator. There are programs that aim to test the relative "quality" (i.e. statistical characteristics) of PRNGs.
If you do test your algorithm, let us know how it went!
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]