<commit_before>// Taken from: https://github.com/derhuerst/svg-partial-circle
// TODO: fix/extend svg-partial-circle lib
export default function partialCircle(cx, cy, r, start, end) {
  const length = end - start;
  if (length === 0) return [];

  const fromX = cx + r * Math.cos(start);
  const fromY = cy + r * Math.sin(start);
  const toX = cx + r * Math.cos(end);
  const toY = cy + r * Math.sin(end);
  const large = Math.abs(length) <= Math.PI ? '0' : '1';
  const sweep = length < 0 ? '0' : '1';

  return [
    ['M', fromX, fromY],
    ['A', r, r, 0, large, sweep, toX, toY],
  ]
}<commit_msg>Improve partialCircle readibility<commit_after>// Taken from: https://github.com/derhuerst/svg-partial-circle
// @TODO: fix/extend svg-partial-circle lib
export default function partialCircle(cx, cy, r, start, end) {
  const length = end - start;
  if (length === 0) return [];

  const fromX = r * Math.cos(start) + cx;
  const fromY = r * Math.sin(start) + cy;
  const toX = r * Math.cos(end) + cx;
  const toY = r * Math.sin(end) + cy;
  const large = Math.abs(length) <= Math.PI ? '0' : '1';
  const sweep = length < 0 ? '0' : '1';

  return [
    ['M', fromX, fromY],
    ['A', r, r, 0, large, sweep, toX, toY],
  ]
}
{'fraction_non_alphanumeric': 0.18233851185609157, 'fraction_numerical': 0.011447260834014717, 'mean_word_length': 3.121212121212121, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3701933', 'n_tokens_mistral': 474, 'n_tokens_neox': 459, 'n_words': 138}