Skip to content
This repository was archived by the owner on Jun 21, 2025. It is now read-only.

Commit 98a7319

Browse files
authored
modify extensions/math/src/math-function line 42 (#47)
1 parent 54c3642 commit 98a7319

File tree

5 files changed

+311
-19
lines changed

5 files changed

+311
-19
lines changed

extensions/math/src/math-function.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function generateSvgPath(
3939
const y = mathFunc(x);
4040
4141
// Convert the values of a mathematical function to SVG coordinates
42-
const svgX = (x - xMin) * scaleX;
42+
const svgX = x * scaleX;
4343
const svgY = (yMax - y) * scaleY; // Invert the y-axis to conform to the SVG coordinate system
4444
path.push(
4545
`${x === xMin || svgY > 1500 || svgY < -1500 ? "M" : "L"} ${svgX} ${svgY}`,

0 commit comments

Comments
 (0)