类 KBStraightLine
- java.lang.Object
-
- cn.mcres.gyhhy.MXLib.math.graph.KBStraightLine
-
- 所有已实现的接口:
Distancer
,StraightLine
public class KBStraightLine extends Object implements StraightLine
KB Straight Line
a straight line represented by a function.
使用一次函数表示的直线
The Function in Math:
y = kx + b (y = k * x + b)
-
-
构造器概要
构造器 限定符 构造器 说明 KBStraightLine(double k, double b)
protected
KBStraightLine(double x1, double y1, double x2, double y2)
KBStraightLine(Point a, Point b)
-
方法概要
修饰符和类型 方法 说明 static double
distance(double A, double B, double C, Point p)
直线方程中
A = y2 - y1,
B = x1 - x2,
C = (x2 * y1) - (x1 * y2)
Copy from https://blog.csdn.net/ffgcc/article/details/79941512double
distance(Point p)
Get the distance between thie point and this object.
获取提供的点与该对象的距离.double
getB()
double
getK()
Point
getPoint(double x)
Point
getPoint(int x)
Point
getRandPoint()
Get a random point from this line.
获取直线上的随机一个点static void
main(String[] args)
ABCStraightLine
toABCStraightLine()
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 cn.mcres.gyhhy.MXLib.math.graph.StraightLine
distance, getPointSet
-
-
-
-
方法详细资料
-
getRandPoint
public Point getRandPoint()
从接口复制的说明:StraightLine
Get a random point from this line.
获取直线上的随机一个点- 指定者:
getRandPoint
在接口中StraightLine
- 返回:
- Random point
-
getK
public double getK()
-
main
public static void main(String[] args)
-
distance
public static double distance(double A, double B, double C, Point p)
直线方程中
A = y2 - y1,
B = x1 - x2,
C = (x2 * y1) - (x1 * y2)
Copy from https://blog.csdn.net/ffgcc/article/details/79941512
-
distance
public double distance(Point p)
从接口复制的说明:Distancer
Get the distance between thie point and this object.
获取提供的点与该对象的距离.
-
getB
public double getB()
-
getPoint
public Point getPoint(int x)
- 指定者:
getPoint
在接口中StraightLine
-
getPoint
public Point getPoint(double x)
- 指定者:
getPoint
在接口中StraightLine
-
toABCStraightLine
public ABCStraightLine toABCStraightLine()
- 指定者:
toABCStraightLine
在接口中StraightLine
-
-