libpysal.cg.get_angle_between¶
- libpysal.cg.get_angle_between(ray1, ray2)[source]¶
Returns the angle formed between a pair of rays which share an origin.
- Parameters:
- ray1
libpysal.cg.Ray
A ray forming the beginning of the angle measured.
- ray2
libpysal.cg.Ray
A ray forming the end of the angle measured.
- ray1
- Returns:
- angle
float
The angle between
ray1
andray2
.
- angle
- Raises:
ValueError
Raised when rays do not have the same origin.
Examples
>>> get_angle_between( ... Ray(Point((0, 0)), Point((1, 0))), ... Ray(Point((0, 0)), Point((1, 0))) ... ) 0.0