Declaration: TMat4D.FillLayer (Layer, TimeSlot: integer; Mode: integer; par1, par2: double): integer;
The function FillLayer fills the specified Layer in the specified TimeSlot with values depending on the Mode parameter:

Mode Type of Generated Values Parameters
0 contant value par1: value
par2: ignored
1 uniformly distributed values par1: lower limit
par2: upper limit
2 normally distributed values par1: mean
par2: standard deviation

The function returns the follówing error codes:

 0 ... everything is OK
-1 ... Layer is out of range
-2 ... TimeSlot is out of range
-3 ... invalid Mode