Add engine-internal convenience macro for allocating typed arrays, improve error message.
PiperOrigin-RevId: 705126655 Change-Id: I2bd8fada6d33a919d2fb82297f93ac57958355a4
This commit is contained in:
committed by
Copybara-Service
parent
3ca97248a3
commit
2691887500
@@ -134,7 +134,7 @@ static void mj_springdamper(const mjModel* m, mjData* d) {
|
||||
mjtNum kD = m->flex_damping[f] / m->opt.timestep;
|
||||
|
||||
mj_markStack(d);
|
||||
mjtNum* qfrc = mj_stackAllocNum(d, 3*m->flex_vertnum[f]);
|
||||
mjtNum* qfrc = mjSTACKALLOC(d, 3*m->flex_vertnum[f], mjtNum);
|
||||
mju_zero(qfrc, 3*m->flex_vertnum[f]);
|
||||
|
||||
// compute force element-by-element
|
||||
|
||||
Reference in New Issue
Block a user