Add private function mju_fillInt
PiperOrigin-RevId: 845217293 Change-Id: I604372ab7ea7f4d47d9427d36dc8cd78e60d84ca
This commit is contained in:
committed by
Copybara-Service
parent
477a14dcb2
commit
2b9940bc67
@@ -239,9 +239,7 @@ static int dualState(const mjModel* m, const mjData* d, int* state) {
|
||||
int nactive = ne + nf;
|
||||
|
||||
// equality
|
||||
for (int i=0; i < ne; i++) {
|
||||
state[i] = mjCNSTRSTATE_QUADRATIC;
|
||||
}
|
||||
mju_fillInt(state, mjCNSTRSTATE_QUADRATIC, ne);
|
||||
|
||||
// friction
|
||||
for (int i=ne; i < ne+nf; i++) {
|
||||
@@ -301,9 +299,7 @@ static int dualState(const mjModel* m, const mjData* d, int* state) {
|
||||
}
|
||||
|
||||
// replicate state in all cone dimensions
|
||||
for (int j=0; j < dim; j++) {
|
||||
state[i+j] = result;
|
||||
}
|
||||
mju_fillInt(state+i, result, dim);
|
||||
|
||||
// advance
|
||||
i += (dim-1);
|
||||
|
||||
Reference in New Issue
Block a user