FHannes Posted September 23, 2011 Share Posted September 23, 2011 (edited) The first Divi 3.28 release is now available. So far the release is completely centered around new functions. The most prominent ones are the Gaussian function based algorithms. They allow you to generate random numbers that are closer to the minimum value of the range based on a given variance. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Changelog: Bugfixes: - Define not closed on code completion error - Loading toolbar positions could throw an error - GetCursorType was not working properly Improvements: - Dock positions are no longer saved Additions: - function Ln(const X: Extended): Extended; - function Gauss(const x, Mean, Variance: Extended): Extended; - function RandG(const Variance: Extended): Extended; - function RandomG(const Range: Integer; const Variance: Extended): Integer; - function RandomRangeG(const AFrom, ATo: Integer; const Variance: Extended): Integer; - function RndCirclePoint(const mx, my, r: Integer): TPoint; - function RndCirclePointG(const mx, my, r: Integer; const Variance: Extended): TPoint; - function RndBoxPoint(const b: TBox): TPoint; - function RndBoxPointG(const b: TBox; const Variance: Extended): TPoint; An example of 10000 random circle points plotted at variance 2: The same for variance 5: And for variance 1: Enjoy the release ~Freddy Edited October 27, 2011 by Freddy Quote Link to comment Share on other sites More sharing options...
Wanted Posted September 23, 2011 Share Posted September 23, 2011 Good work man, loving these new functions. Quote Link to comment Share on other sites More sharing options...
Jakkle Posted September 23, 2011 Share Posted September 23, 2011 Well done for working it out the algorithms and putting it into code Grate work Freddy Quote Link to comment Share on other sites More sharing options...
wundertüte Posted September 23, 2011 Share Posted September 23, 2011 great functions !!! Quote Link to comment Share on other sites More sharing options...
zippoxer Posted October 22, 2011 Share Posted October 22, 2011 I always looked for that kind of algorithm (smart random), but didn't know what to write in Google Quote Link to comment Share on other sites More sharing options...