template<typename T>
spice::interpolation::nearest_neighbor_round class

Nearest neighbour interpolation between pixels adjacent to x and y by rounding x and y.

Template parameters
T type of pixel values

Constructors, destructors, conversion operators

nearest_neighbor_round(image<T> const& source) explicit
Construct a new nearest neighbor (round) interpolation object.

Public functions

auto operator()(float x, float y) -> color<T>
Get the interpolated value at the provided coordinates.

Function documentation

template<typenameT>
spice::interpolation::nearest_neighbor_round<T>::nearest_neighbor_round(image<T> const& source) explicit

Construct a new nearest neighbor (round) interpolation object.

Parameters
source the image to interpolate

template<typenameT>
color<T> spice::interpolation::nearest_neighbor_round<T>::operator()(float x, float y)

Get the interpolated value at the provided coordinates.

Parameters
x
y
Returns color<T>