v0.14.0
Loading...
Searching...
No Matches
test_for_zero.hpp File Reference
#include <cmath>
#include <iostream>
#include <string>

Go to the source code of this file.

Functions

template<class T >
void test_for_zero (const T &t, const std::string &s)
 

Function Documentation

◆ test_for_zero()

template<class T >
void test_for_zero ( const T & t,
const std::string & s )

Definition at line 7 of file test_for_zero.hpp.

7 {
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:58