diff --git a/markdown/dev/reference/api/point/slope/en.md b/markdown/dev/reference/api/point/slope/en.md index 8f419f2a7ec..b9c1579c0de 100644 --- a/markdown/dev/reference/api/point/slope/en.md +++ b/markdown/dev/reference/api/point/slope/en.md @@ -2,28 +2,40 @@ title: Point.slope() --- -The `Point.slope()` method returns slope of a line made by this Point and that Point. +The `Point.slope()` method returns the slope of a line made by this Point and that Point. ## Signature ```js -point.slope(a,b) + +point.slope(otherPoint) + ``` ## Example + ```js + ({ Point, points, Path, paths, Snippet, snippets, part }) => { - points.A = new Point(5,10) - points.B = new Point(10,20) + points.A = new Point(0,0) + points.B = new Point(40,30) + + const slope = points.A.slope(points.B) + +paths.line = new Path() +.move(points.A) +.line(points.B) +.attr("class", "canvas") +.setText("Slope: " + slope, "text-xs center") -point.slope(A,B) return part } + ```