use hyperreal::Real;
use crate::{CurveResult, Point2, Segment2};
#[derive(Clone, Debug, PartialEq)]
pub struct BulgeVertex2 {
point: Point2,
bulge: Real,
}
impl BulgeVertex2 {
pub const fn new(point: Point2, bulge: Real) -> Self {
Self { point, bulge }
}
pub const fn point(&self) -> &Point2 {
&self.point
}
pub const fn bulge(&self) -> &Real {
&self.bulge
}
pub fn segment_to(&self, next: &Self) -> CurveResult<Segment2> {
Segment2::from_bulge(self.point.clone(), next.point.clone(), self.bulge.clone())
}
}