v0.14.0
Loading...
Searching...
No Matches
test_for_zero.hpp
Go to the documentation of this file.
1#include <cmath>
2#include <iostream>
3#include <string>
4
5#pragma once
6
7template <class T> void test_for_zero(const T &t, const std::string &s) {
8 if (std::abs(t) < 1e-8)
9 std::cout << "PASS: " << s << "\n";
10 else {
11 std::cerr << "FAIL: " << s << " " << std::abs(t) << "\n";
12 std::exit(1);
13 }
14}
constexpr double t
plate stiffness
Definition plate.cpp:59
void test_for_zero(const T &t, const std::string &s)