Adobe.com
Contents Suites Classes Class Index Member Index

AIRandomBellCurveSuite Struct Reference
[API Suite List]

Together with the AIRandomSuite, allows you to add a degree of randomness, or "noise" to an effect. More...

#include <AIRandomBellCurve.h>

List of all members.

Public Attributes

AIAPI AIFixed(* FixedRndBellCurve )(void)
 Gets a random number with normal probability distribution centered on zero and with a standard deviation of one.
AIAPI void(* SetRndSeedBellCurve )(ai::int32 seed)
 Sets the random number seed used to generate subsequent random numbers.
AIAPI ai::int32(* GetRndSeedBellCurve )(void)
 Retrieves the current random-number seed.

Detailed Description

Together with the AIRandomSuite, allows you to add a degree of randomness, or "noise" to an effect.

This suite provides numbers distributed along a standard probability curve (as opposed to an even distribution of random numbers).


Member Data Documentation

Gets a random number with normal probability distribution centered on zero and with a standard deviation of one.


(Note that this function returns a numeric value, not an error code.)

The value returned is in the range -1 to +1 about 70% of the time (see table below) and the distribution of values in this range is close to linear. The probability of a value occurring outside this range drops off quickly the farther you get from the origin.

Output Range

% result in this range

-0.5 to +0.5

about 40%

-1.0 to +1.0

about 70%

-1.5 to +1.5

about 86%

-2.0 to +2.0

about 96%

-3.0 to +3.0

>99%

-5.0 to +5.0

100%

-infinity to 0.0

50%

0.0 to +infinity

50%

In theory, this routine could occasionally generate very large positive or negative values but in fact, no numbers outside the range -5 to +5 are generated.

Retrieves the current random-number seed.

The initial seed is based on the current date and time.
(Note that this function returns a numeric value, not an error code.)

Returns:
The random seed.
See also:
AIRandomSuite::GetRndSeed()

Sets the random number seed used to generate subsequent random numbers.

Use to restart a sequence of random numbers, for example for debugging. See AIRandomSuite::GetRndSeed() for an example.
(Note that this function does not return an error code.)

Parameters:
The new seed number, or 0 to set to an initial seed based on the current date and time.

The documentation for this struct was generated from the following file:


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks