Commit e8da0e2a authored by Grand Francois's avatar Grand Francois
Browse files

classe ParamValues : arguments du constructeur déplacé vers une nouvelle méthode setValues()

Showing with 4 additions and 3 deletions
+4 -3
......@@ -176,7 +176,7 @@ export class ParamValues {
*/
private _valueList: number[];
constructor(o: number | any, max?: number, step?: number) {
public setValues(o: number | any, max?: number, step?: number) {
if (typeof (o) === "number") {
if (max == undefined) {
this._valueMode = ParamValueMode.SINGLE;
......@@ -191,7 +191,7 @@ export class ParamValues {
else if (Array.isArray(o))
this._valueList = o;
else
throw new Error(`appel du constructeur ParamValues invalide`);
throw new Error(`ParamValues.setValues() : appel invalide`);
}
public get valueMode() {
......
......@@ -251,7 +251,8 @@ export class CourbeRemous extends Nub {
// Calcul des courbes de remous
const xValues = new ParamValues(0, this.prms.Long.v, this.Dx)
const xValues = new ParamValues();
xValues.setValues(0, this.prms.Long.v, this.Dx)
// let crbFlu: { [key: number]: number; } = this.calculFluvial();
const rCourbeFlu: ResultElement = this.calculFluvial(xValues);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment