indexing description: "[ A round EM_GOOF_AREA. ]" date: "$Date$" revision: "$Revision$" class EM_GOOF_ROUND_AREA inherit EM_GOOF_AREA create make feature {EM_GOOF_FORCE, EM_GOOF_PHYSICS} -- init make(a_center: EM_VECTOR_2D a_radius: DOUBLE) is -- Make round area with center and radius do center := a_center radius := a_radius ensure center_set: center = a_center radius_set: radius = a_radius end feature {EM_GOOF_FORCE, EM_GOOF_PHYSICS} -- status is_in_area(point: EM_VECTOR_2D): BOOLEAN is -- Is 'point' in the area? do result := point.distance(center) < radius end feature {EM_GOOF_FORCE, EM_GOOF_PHYSICS} -- properties center: EM_VECTOR_2D -- Center of the round area set_center(a_center: EM_VECTOR_2D) is -- Set position require a_center_not_void: a_center /= void do center := a_center ensure center_set: center = a_center end radius: DOUBLE -- Radius of the round area set_radius(a_radius: DOUBLE) is -- Set position do radius := a_radius ensure radius_set: radius = a_radius end invariant positive_radius: radius > 0 is_center: center /= void end