<commit_before>import Vector from 'vector';
import Rect from 'rect';

const radius = .35;

function Ball({x, y}, scale) {

	let pos = Vector({x, y});
	return {
		get pos() {
			return pos;
		},
		set pos({x, y}) {
			pos = Vector({x, y});
		},
		get bbox() {
			return Rect(pos.add({x: -radius, y: -radius}), {width: radius*2, height: radius*2});
		},
		set bbox({x, y}) {
			pos = Vector({x, y}).add({x: radius, y: radius});
		},
		get radius() {
			return radius;
		},
		move(v){
			let {x, y} = pos.add(v).mul(scale);
			pos = Vector({x: (x | 0) + .5, y}).mul(1/scale);
		},
		draw(screen) {
			screen.brush = 'white';
			screen.pen = {
				strokeStyle: 'red',
				lineWidth: 2/scale
			};
			screen.beginPath();
			screen.arc({x: 0, y: 0}, radius, 0, 2*Math.PI, false);
			screen.closePath();
			screen.fillPath();
			screen.drawPath();
		}
	};
}

Ball.Radius = radius;

export default Ball;
<commit_msg>change ball border and radius<commit_after>import Vector from 'vector';
import Rect from 'rect';

const radius = .3;

function Ball({x, y}, scale) {

	let pos = Vector({x, y});
	return {
		get pos() {
			return pos;
		},
		set pos({x, y}) {
			pos = Vector({x, y});
		},
		get bbox() {
			return Rect(pos.add({x: -radius, y: -radius}), {width: radius*2, height: radius*2});
		},
		set bbox({x, y}) {
			pos = Vector({x, y}).add({x: radius, y: radius});
		},
		get radius() {
			return radius;
		},
		move(v){
			let {x, y} = pos.add(v).mul(scale);
			pos = Vector({x: (x | 0) + .5, y}).mul(1/scale);
		},
		draw(screen) {
			screen.brush = 'white';
			screen.pen = {
				strokeStyle: 'hsl(210, 50%, 50%)',
				lineWidth: 1/scale
			};
			screen.beginPath();
			screen.arc({x: 0, y: 0}, radius, 0, 2*Math.PI, false);
			screen.closePath();
			screen.fillPath();
			screen.drawPath();
		}
	};
}

Ball.Radius = radius;

export default Ball;

{'fraction_non_alphanumeric': 0.2134344528710726, 'fraction_numerical': 0.016251354279523293, 'mean_word_length': 2.9720430107526883, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2836816', 'n_tokens_mistral': 848, 'n_tokens_neox': 722, 'n_words': 186}