/* SPDX-License-Identifier: GPL-2.0-or-later * Copyright 2022 Blender Foundation. */ #pragma once /** \file * \ingroup bli */ #include #include #include "BLI_color.hh" #include "BLI_math_base.hh" namespace blender::math { template inline ColorSceneLinear4f interpolate(const ColorSceneLinear4f &a, const ColorSceneLinear4f &b, const float t) { return {math::interpolate(a.r, b.r, t), math::interpolate(a.g, b.g, t), math::interpolate(a.b, b.b, t), math::interpolate(a.a, b.a, t)}; } template inline ColorSceneLinearByteEncoded4b interpolate( const ColorSceneLinearByteEncoded4b &a, const ColorSceneLinearByteEncoded4b &b, const float t) { return {math::interpolate(a.r, b.r, t), math::interpolate(a.g, b.g, t), math::interpolate(a.b, b.b, t), math::interpolate(a.a, b.a, t)}; } } // namespace blender::math