Public Function StepFn( _ ByVal vX As Variant _ ) As Variant
If X < 0: Return 0. If X = 0: Return .5 If X > 0: Return 1.Examples:
StepFn(-1) = 0 StepFn(0) = 0.5 StepFn(1) = 1 StepFn(23) = 1See also:
StepFnVerify Subroutine Sign Function Sgn Function (Visual Basic)Definition:
Sgn(vX) / 2 + 1 / 2vX: Number whose step (as defined above) is returned. Function returns Null if vX is Null or cannot be fixed up to a number.
v1.5 BugFix: Corrected this function to return 0 (zero) instead of -1 when vX is a negative number.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.