public class Segment2
extends java.lang.Object
Constructor and Description |
---|
Segment2(Point2 a,
Point2 b)
Creates segment [a,b]
|
Segment2(Point2 a,
Vector2 b)
Creates segment [a,b]
|
Modifier and Type | Method and Description |
---|---|
static double |
computeAngle(Segment2 s1,
Segment2 s2)
Returns the angle in radian between the two segments s1 and s2
|
static double |
computeScale(Segment2 s1,
Segment2 s2)
Computes the scale between s1 and s2
|
void |
copy(Segment2 s) |
Point2 |
end() |
void |
end(Point2 a)
Sets B in [A,B]
|
Point2 |
init() |
void |
init(Point2 a)
Sets A in [A,B]
|
java.lang.String |
toString() |
public Point2 init()
public Point2 end()
public void init(Point2 a)
a
- public void end(Point2 a)
a
- public void copy(Segment2 s)
public static double computeAngle(Segment2 s1, Segment2 s2)
s1
- s2
- public static double computeScale(Segment2 s1, Segment2 s2)
s1
- s2
- public java.lang.String toString()
toString
in class java.lang.Object