Skip to content

Commit 5e9e9a2

Browse files
authored
Update index.html
Circle segment calculator
1 parent 52d727c commit 5e9e9a2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3307,7 +3307,7 @@ <h3 itemprop="name" style="margin:7px">Area of a Circle Segment</h3>
33073307
const height = parseFloat(document.getElementById('segment-height').value);
33083308
const radius = parseFloat(document.getElementById('parent-radius').value);
33093309

3310-
if (isNaN(height) || isNaN(length) || isNaN(radius) || height === 0 || length === 0 || radius === 0) {
3310+
if (isNaN(height) || isNaN(length) || isNaN(radius)) {
33113311
document.getElementById('segment-area').innerText = '';
33123312
return;
33133313
}
@@ -3334,7 +3334,7 @@ <h3 itemprop="name" style="margin:7px">Area of a Circle Segment</h3>
33343334

33353335

33363336

3337-
if (height > 0 || length > 0) {
3337+
else if (height > 0 || length > 0) {
33383338

33393339
const ratio = 2 * height / length;
33403340

0 commit comments

Comments
 (0)