phase := Frac(phase + Random * 0.05);
output.asFloat(Sin(phase * Pi * 2) * depth.asFloat);
| Procedure | Description |
|---|---|
function minS(const A, B: single): single; |
Return the smaller of two single-precision floating-point values |
function maxS(const A, B: single): single; |
Return the larger of two single-precision floating-point values |
function maxI(const A, B: integer): integer; |
Return the larger of two integer values |
function minI(const A, B: integer): integer; |
Return the smaller of two integer values |
function Pi: Extended; |
Return the mathematical constant π |
function Log(e: Extended): Extended; |
Return the base-10 logarithm of e (same as Log10) |
function Exp(e: Extended): Extended; |
Return e raised to the power of e |
function ArcTan(e: Extended): Extended; |
Return the arctangent of e |
function ArcTan2(e1, e2: Extended): Extended; |
Return the arctangent of e1 / e2 |
function Arcsin(e: Extended): Extended; |
Return the arcsine of e |
function Arccos(e: Extended): Extended; |
Return the arccosine of e |
function Abs(d: Extended): Extended; |
Return the absolute value of an extended value |
function Abs(d: Int64): Int64; |
Return the absolute value of an integer |
function Power(Base, Exponent: Extended): Extended; |
Return Base raised to the power of Exponent |
function Sqr(d: Extended): Extended; |
Return the square of a number |
function Sqrt(d: Extended): Extended; |
Return the square root of a number |
function ArcTan(d: Extended): Extended; |
Return the arctangent of d |
function Ln(d: Extended): Extended; |
Return the natural logarithm of d |
function Log10(x: Extended): Extended; |
Return the base-10 logarithm of x |
function Log2(x: Extended): Extended; |
Return the base-2 logarithm of x |
function LogN(Base, x: Extended): Extended; |
Return the logarithm of x in base Base |
function Sin(d: Extended): Extended; |
Return the sine of an angle |
function Cos(d: Extended): Extended; |
Return the cosine of an angle |
function Tan(d: Extended): Extended; |
Return the tangent of an angle |
function ArcTan2(x, y: Extended): Extended; |
Quadrant-aware two-argument arctangent (the C-style name Atan2 does not exist) |
function Hypot(x, y: Extended): Extended; |
Return Sqrt(x*x + y*y) |
function Sign(AValue: Extended): Int8; |
Return -1, 0 or 1 depending on the sign of a float value |
function Sign(AValue: Int64): Int8; |
Return -1, 0 or 1 depending on the sign of an integer value |
function Cotan(d: Extended): Extended; |
Return the cotangent of an angle |
function Secant(d: Extended): Extended; |
Return the secant of an angle |
function Cosecant(d: Extended): Extended; |
Return the cosecant of an angle |
function SinH(d: Extended): Extended; |
Return the hyperbolic sine |
function CosH(d: Extended): Extended; |
Return the hyperbolic cosine |
function TanH(d: Extended): Extended; |
Return the hyperbolic tangent |
function ArcSinH(d: Extended): Extended; |
Return the inverse hyperbolic sine |
function ArcCosH(d: Extended): Extended; |
Return the inverse hyperbolic cosine |
function ArcTanH(d: Extended): Extended; |
Return the inverse hyperbolic tangent |
function Exp(d: Extended): Extended; |
Return e raised to the power of d |
function Round(d: Extended): Int64; |
Round a floating-point value to the nearest integer |
function Round(d: Extended; Precision: Int8): Extended; |
Round a floating-point value to a specified decimal precision |
function Frac(d: Extended): Extended; |
Return the fractional part of a number |
function Int(d: Extended): Extended; |
Return the integer part of a number |
function Trunc(d: Extended): Int64; |
Truncate the fractional part of a number |
function Ceil(d: Extended): Int64; |
Return the smallest integer greater than or equal to d |
function Floor(d: Extended): Int64; |
Return the largest integer less than or equal to d |
function DegToRad(Degrees: Extended): Extended; |
Convert an angle from degrees to radians |
function RadToDeg(Radians: Extended): Extended; |
Convert an angle from radians to degrees |
function Lerp(A, B, T: Extended): Extended; |
Linear interpolation between A and B by factor T (0 to 1) |
function SmoothStep(Edge0, Edge1, x: Extended): Extended; |
Hermite interpolation: 0 below Edge0, 1 above Edge1, smooth in between |
function Random(Min, Max: Int64): Int64; |
Return a random integer between Min and Max |
function Random(l: Int64): Int64; |
Return a random integer from 0 to l - 1 |
function Random: Extended; |
Return a random floating-point number between 0.0 and 1.0 |
procedure Randomize; |
Initialize the random number generator with a new seed |
version 7.0.250121
Edit All Pages