VPDetectorBinning WhichBin Method (Double, Double,  Double )Virtual Photonics - VTS Library
Virtual Photonics
WhichBin determines which bin "value" is in given a list of bin centers and bin sizes. If value not in any bin, -1 returned. This allows for non-contiguous bins and nonuniformly spaced bins.

Namespace: Vts.MonteCarlo.Helpers
Assembly: Vts (in Vts.dll) Version: 1.0.12.0 (1.0.12)
Syntax

public static int WhichBin(
	double value,
	double binSize,
	double[] binCenters
)

Parameters

value
Type: OnlineSystem Double
value to be binned
binSize
Type: OnlineSystem Double
bin size
binCenters
Type:  OnlineSystem Double 
list of bin centers

Return Value

Type: OnlineInt32
See Also