reexported.cc 902 B

123456789101112131415161718192021222324252627282930
  1. // -*- mode: c++; coding: utf-8 -*-
  2. // ra-ra/test - Handling of scalar std:: functions that have been extended for arrays in ra::.
  3. // (c) Daniel Llorens - 2021
  4. // This library is free software; you can redistribute it and/or modify it under
  5. // the terms of the GNU Lesser General Public License as published by the Free
  6. // Software Foundation; either version 3 of the License, or (at your option) any
  7. // later version.
  8. #include <iostream>
  9. #include <iterator>
  10. #include "ra/test.hh"
  11. using std::cout, std::endl, ra::TestRecorder;
  12. using real = double;
  13. int main()
  14. {
  15. TestRecorder tr;
  16. tr.section("std");
  17. {
  18. ra::Small<real, 3> a = { 1, 2, 3 };
  19. ra::Small<real, 3> b = { 4, 5, 6 };
  20. cout << lerp(a, b, 0.5) << endl; // this is std::lerp put in :: in ra/ra.hh
  21. cout << lerp(4., 1., 0.5) << endl; // this is ra::lerp found through ADL
  22. }
  23. return tr.summary();
  24. }