]> git.r.bdr.sh - rbdr/lissajous/blobdiff - lib/components/triple_frequency.js
Add a few comments
[rbdr/lissajous] / lib / components / triple_frequency.js
index 1f118b90ebb30eac84eeaa3fdef32a9986012162..a67f1cd0d6f032afc014eb0dfd183caee3ba2327 100644 (file)
@@ -1,12 +1,15 @@
 import { Component } from '@serpentity/serpentity';
 
 import { Component } from '@serpentity/serpentity';
 
+/**
+  * Stores three values of frequency, intended for a 3D parametric curve.
+  */
 export default class TripleFrequency extends Component {
   constructor(config) {
 
     super(config);
 
 export default class TripleFrequency extends Component {
   constructor(config) {
 
     super(config);
 
-    this.a = this.a || Math.random();
-    this.b = this.b || Math.random();
-    this.c = this.c || Math.random();
+    this.a = this.a || 2 * Math.PI * Math.random();
+    this.b = this.b || 2 * Math.PI * Math.random();
+    this.c = this.c || 2 * Math.PI * Math.random();
   }
 };
   }
 };