reexported.cc 932 B

12345678910111213141516171819202122232425262728293031
  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. #include "ra/complex.hh"
  12. using std::cout, std::endl, ra::TestRecorder;
  13. using real = double;
  14. int main()
  15. {
  16. TestRecorder tr;
  17. tr.section("std");
  18. {
  19. ra::Small<real, 3> a = { 1, 2, 3 };
  20. ra::Small<real, 3> b = { 4, 5, 6 };
  21. cout << lerp(a, b, 0.5) << endl; // this is std::lerp put in :: in ra/complex.hh
  22. cout << lerp(4., 1., 0.5) << endl; // this is ra::lerp found through ADL
  23. }
  24. return tr.summary();
  25. }