blob: 0d4f5af939f263abe8793bd51056417837d776a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# mode: run
# tag: cpp, werror, cpp20
from libcpp.cmath cimport lerp
def test_lerp(double a, double b, double t):
""" Test C++20 std::lerp function
>>> test_lerp(1.0, 2.0, 0.5)
1.5
>>> test_lerp(1.0, 4.0, 0.5)
2.5
"""
return lerp(a, b, t)
|