aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PhysicsSimulationWeight.tsx
diff options
context:
space:
mode:
authorbrynnchernosky <56202540+brynnchernosky@users.noreply.github.com>2023-02-22 14:29:44 -0500
committerbrynnchernosky <56202540+brynnchernosky@users.noreply.github.com>2023-02-22 14:29:44 -0500
commit9a5f2e9d098d0ad2db1be90818b6295390a60501 (patch)
tree3598cff92e4a6f0dcfbdcc38dbc168a993b5cef2 /src/client/views/nodes/PhysicsSimulationWeight.tsx
parent0f03110bab8d4636d33abf7568bf7c6cb14847b4 (diff)
pendulum angle
Diffstat (limited to 'src/client/views/nodes/PhysicsSimulationWeight.tsx')
-rw-r--r--src/client/views/nodes/PhysicsSimulationWeight.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/PhysicsSimulationWeight.tsx b/src/client/views/nodes/PhysicsSimulationWeight.tsx
index 66af645b5..9aa5a6aab 100644
--- a/src/client/views/nodes/PhysicsSimulationWeight.tsx
+++ b/src/client/views/nodes/PhysicsSimulationWeight.tsx
@@ -293,6 +293,7 @@ export default class Weight extends React.Component<IWeightProps, IState> {
this.setState({xVelocity: this.props.startVelX ?? 0})
this.setState({yVelocity: this.props.startVelY ?? 0})
this.props.dataDoc['updatedForces'] = (this.props.dataDoc['startForces'])
+ this.setState({angleLabel: Math.round(this.props.dataDoc['pendulumAngle']* 100) / 100})
this.setDisplayValues();
};
@@ -356,7 +357,7 @@ export default class Weight extends React.Component<IWeightProps, IState> {
magnitude: mag,
directionInDegrees: angle,
};
- this.setState({angleLabel: Math.round(oppositeAngle * 100) / 100})
+ this.setState({angleLabel: Math.round(this.props.dataDoc['pendulumAngle']* 100) / 100})
return [this.forceOfGravity, forceOfTension];
};