question: public final boolean contains ( PlaPointInt p_point , double tolerance ) { if ( p_point . is_NaN ( ) || start_point . is_NaN ( ) || end_point . is_NaN ( ) ) return false ; PlaPointFloat f_point = p_point . to_float ( ) ; PlaPointFloat f_begin = start_point . to_float ( ) ; PlaPointFloat f_end = end_point . to_float ( ) ; double d_begin_this = f_begin . distance_square ( f_point ) ; double d_end_this = f_end . distance_square ( f_point ) ; double d_begin_end = f_begin . distance_square ( f_end ) ; if ( d_begin_end >= d_begin_this + tolerance ) { if ( d_begin_end >= d_end_this + tolerance ) { return true ; } else { return false ; } } else { if ( d_begin_end >= d_end_this + tolerance ) { return false ; } else { return false ; } } }
target:  Assume that the point is colinear with this segment Check if the given point is "within" this segment with a given tolerance