MBDyn new joints, sine, cosine

This commit is contained in:
Aik-Siong Koh
2023-12-08 21:39:53 -07:00
parent 98d6d46ebd
commit 56bba4e921
58 changed files with 5895 additions and 1905 deletions

View File

@@ -33,6 +33,7 @@ namespace MbD {
Array(std::initializer_list<T> list) : std::vector<T>{ list } {}
virtual ~Array() {}
virtual void initialize();
static bool equaltol(double x, double xx, double tol);
void copyFrom(std::shared_ptr<Array<T>> x);
virtual void zeroSelf();
virtual double sumOfSquares() = 0;
@@ -63,6 +64,11 @@ namespace MbD {
inline void Array<T>::initialize()
{
}
template<>
inline bool Array<double>::equaltol(double x, double xx, double tol)
{
return std::abs(x - xx) < tol;
}
template<typename T>
inline void Array<T>::copyFrom(std::shared_ptr<Array<T>> x)
{