function getIntersection line1 line2 =
(
-- 计算两条线的类型
type1 = classof line1
type2 = classof line2
-- 判断两条线的类型是否相同
if (type1 != type2) then
(
print "Error: Two lines have different types."
return undefined
)
-- 计算交点