normalizedOffset(_:_:)

Determines a normalized offset value for linear interpolation from two values on either side of 0, with 0 being the point to interpolate towards. The provided values are required to have opposite signs (one negative, one positive) in order to use 0 as the marker for the interpolation direction.

MarchingCubes.swift:500
static func normalizedOffset(_ f0: Float, _ f1: Float) -> Float

Parameters

f0

The first value.

f1

The second value.

Returns

An offset value between 0 and 1.0 that indicates the relative distance of 0 to the first of the provided points.