X-Git-Url: https://git.r.bdr.sh/rbdr/lissajous/blobdiff_plain/5f6ef99eae91f53239f08143cead1249893fef81..HEAD:/lib/components/triple_frequency.js?ds=sidebyside diff --git a/lib/components/triple_frequency.js b/lib/components/triple_frequency.js index aa768e3..a67f1cd 100644 --- a/lib/components/triple_frequency.js +++ b/lib/components/triple_frequency.js @@ -1,12 +1,15 @@ 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); - this.a = Math.random(); - this.b = Math.random(); - 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(); } };