MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / Get

Method Get

GTE/Samples/Physics/RoughPlaneParticle2/PhysicsModule.cpp:113–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void PhysicsModule::Get(double& x1, double& y1, double& x2, double& y2) const
114{
115 double cs = std::cos(mState[4]);
116 double sn = std::sin(mState[4]);
117 x1 = mState[0] + mLength1 * cs;
118 y1 = mState[2] + mLength1 * sn;
119 x2 = mState[0] - mLength2 * cs;
120 y2 = mState[2] - mLength2 * sn;
121}
122
123void PhysicsModule::Update()
124{

Callers 1

OnDisplayMethod · 0.45

Calls 2

cosFunction · 0.50
sinFunction · 0.50

Tested by

no test coverage detected