FLUJOS/VISUALIZACION/node_modules/ngraph.forcelayout/lib/spring.js
2025-11-07 00:06:12 +01:00

12 lines
337 B
JavaScript
Executable file

module.exports = Spring;
/**
* Represents a physical spring. Spring connects two bodies, has rest length
* stiffness coefficient and optional weight
*/
function Spring(fromBody, toBody, length, springCoefficient) {
this.from = fromBody;
this.to = toBody;
this.length = length;
this.coefficient = springCoefficient;
}