From 4d690e2a2a52f692a34835c8beb4fc3031416227 Mon Sep 17 00:00:00 2001 From: moanos Date: Sat, 20 Jul 2024 08:18:38 +0200 Subject: [PATCH] feat: use more descriptive width --- src/assets/calculator.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/assets/calculator.js b/src/assets/calculator.js index 05b6eff..34fac7b 100644 --- a/src/assets/calculator.js +++ b/src/assets/calculator.js @@ -19,19 +19,19 @@ const FAIL_CRITERIA = { }; class Dimensions { - constructor(length, width, height) { - this.length = length; + constructor(width, depth, height) { this.width = width; + this.depth = depth; this.height = height; } toString() { - return `${this.length}x${this.width}x${this.height}`; + return `${this.width}x${this.depth}x${this.height}`; } static fromDict(data) { - const { length, width, height } = data; - return new Dimensions(length, width, height); + const { width, depth, height } = data; + return new Dimensions(width, depth, height); } }