[libcxx-commits] [PATCH] D60371: Add lerp function to cmath (P0811R3)
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 15 07:46:24 PDT 2019
zoecarver added a comment.
@cpplearner that link is very helpful. In the first answer, there is a suggested function which might work well (though I haven't had time to test it yet). It is similar to the suggested implementation. There is one case which this function does not work for, but we could add a case for that. In pseudocode:
if (t < 0.5) a + (b - a) * t
else b - (b - a) * (1 - t)
Additionally, the link has a lot of good exceptions which we could add to our tests. How does this compare to what you have @mclow.lists? I am going to add some tests to this patch in the meantime, mind sharing what you have so far?
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60371/new/
https://reviews.llvm.org/D60371
More information about the libcxx-commits
mailing list