MinusculeRender/src/util/interpolation.cc

11 lines
325 B
C++
Raw Normal View History

2024-03-22 20:12:09 +08:00
// Copyright 2024 SquareBlock Inc. All Rights Reserved.
// Author: tianlei.richard@qq.com (tianlei.richard)
#include "interpolation.h"
template <>
cv::Vec3b lerp(const float t, const cv::Vec3b &a, const cv::Vec3b &b) {
return cv::Vec3b{lerp(t, a[0], b[0]), lerp(t, a[1], b[1]),
lerp(t, a[2], b[2])};
}