/* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // the helpers the files of physics/components/ share: only they include this header #pragma once #include #include "physics/vehicle.h" const double CouplerTune = 0.1; // skalowanie tlumiennosci inline double square(double val) // SQR() zle liczylo w current() ... { return val * val; } int DirPatch(VehicleEnd Coupler1, VehicleEnd Coupler2); int DirF(VehicleEnd CouplerN); double TableInterpolation(std::map &Map, double Parameter); // the force pressing the end in, of the coupling or of the buffers touching [N]: forwards at the front pulls inline double compression_at(TCoupling const &Coupler, VehicleEnd const End) { return std::max(0.0, (End == VehicleEnd::front ? -1.0 : 1.0) * Coupler.CForce); } bool issection(std::string_view Name, std::string_view Input);