searchPoints

Find the index and normal of the given position among the given points.

  1. ptrdiff_t searchPoints(float[] points, float pos, float norm)
    pure @nogc
    ptrdiff_t
    searchPoints
    (
    float[] points
    ,
    float pos
    ,
    out float norm
    )
  2. ptrdiff_t searchPoints(float[] points, float pos)

Parameters

points float[]

The set of points to search, must contain at least two values.

pos float

The position to search for among the given points.

norm float

The given position, normalized between its two adjacent points.

Return Value

Type: ptrdiff_t

The index of the point right *before* the given position, or -1 if not found.

Meta