<commit_before>Class {
	#name : #BlCircleGeometry,
	#superclass : #BlElementVectorGeometry,
	#instVars : [
		'radius',
		'origin'
	],
	#category : #'Bloc-Basic-Geometry'
}

{ #category : #comparing }
BlCircleGeometry >> = anObject [
	self == anObject ifTrue: [ ^ true ].
	^ self class = anObject class
]

{ #category : #'geometry bounds' }
BlCircleGeometry >> geometryBounds: aBounds [
	"Load my bounds in mutable rectangle.
	@see #geometryBounds for more info"
	<return: #BlBounds>

	^ aBounds
		origin: self origin
		extent: (self radius * 2.0) asPoint
]

{ #category : #comparing }
BlCircleGeometry >> hash [
	^ self class hash
]

{ #category : #initialization }
BlCircleGeometry >> initialize [
	super initialize.
	<commit_msg>Implement containsPoint:in: for Circle geometry<commit_after>Class {
	#name : #BlCircleGeometry,
	#superclass : #BlElementVectorGeometry,
	#instVars : [
		'radius',
		'origin'
	],
	#category : #'Bloc-Basic-Geometry'
}

{ #category : #comparing }
BlCircleGeometry >> = anObject [
	self == anObject ifTrue: [ ^ true ].
	^ self class = anObject class
]

{ #category : #'geometry testing' }
BlCircleGeometry >> containsPoint: aPoint in: aBlElement [

	| centerX centerY |
	centerX := origin x + radius.
	centerY := origin y + radius.
	^ ((aPoint x - centerX) squared + (aPoint y - centerY) squared) < radius squared
]

{ #category : #'geometry bounds' }
BlCircleGeometry >> geometryBounds: aBounds [
	"Load my bounds in mutable rectangle.
	@see #geometryBounds for more info"
	<return: #BlBounds>

	^ aBounds
		origin: self origin
		extent: (self radius * 2.0) asPoint
]

{ #category : #comparing }
BlCircleGeometry >> hash [
	^ self class hash
]

{ #category : #initialization }
BlCircleGeometry >> initialize [
	super initialize.
	
{'fraction_non_alphanumeric': 0.12954545454545455, 'fraction_numerical': 0.0022727272727272726, 'mean_word_length': 4.272455089820359, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '346194', 'n_tokens_mistral': 606, 'n_tokens_neox': 591, 'n_words': 158}