線性函數
Author: 藍邦偉  老師

線性函數

的線性函數(直線)為

A = (-6, -3)
B = (3, 5)
a = Line(A, B)
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
text1: "通過A" + (LaTeX[A]) + ",B" + (LaTeX[B]) + "兩點"
text3: "" + (LaTeX[If[x(A) ≟ x(B), "未定義", If[y(A) ≟ y(B), "y=" + (y(A)), "y=" + (FractionText[Slope[a]]) + "x" + (If[(x(A) * y(B) - x(B) * y(A)) / (x(A) - x(B)) ≥ 0, "+", "-"]) + (FractionText[abs((x(A) * y(B) - x(B) * y(A)) / (x(A) - x(B)))])]]]) + ""