Click or drag to resize
sqx

SQXMakeStep Method

Function [float] MakeStep([float] UnitStep, [int] Round)

Namespace:  sqx
Assembly:  SQX (in SQX.dll) Version: 1.0.2.6 (1.0.2.6)
Syntax
C#
public static SqlDouble MakeStep(
	SqlDouble UnitStep,
	SqlInt32 Round
)

Parameters

UnitStep
Type: System.Data.SqlTypesSqlDouble
[float]
Round
Type: System.Data.SqlTypesSqlInt32
[int]

Return Value

Type: SqlDouble
[float]
Remarks
Make Step function.
Examples
SQL
SELECT sqx.MakeStep(1,1), sqx.MakeStep(2,1), sqx.MakeStep(5,1)
, sqx.MakeStep(1,3), sqx.MakeStep(2,3), sqx.MakeStep(5,3)
/*
-------- -------- -------- ---------- ---------- ----------
0.1      0.2      0.5      0.001      0.002      0.005*/

SELECT sqx.MakeStep(1,-1), sqx.MakeStep(2,-1), sqx.MakeStep(5,-1)
/*
---------------------- ---------------------- ----------------------
10                     20                     50*/

SELECT Value
FROM sqx.XTable(0, 1, sqx.MakeStep(1,3))
/*
Value
----------------------
0
0.001
0.002
0.003
0.004
0.005
...
0.995
0.996
0.997
0.998
0.999
1*/
See Also