<commit_before>// Copyright 2014-2016, University of Colorado Boulder

/**
 * Shape used to indicate 'reset' of something, used on ResetButton.
 *
 * @author <NAME>
 */
define( function( require ) {
  'use strict';

  // modules
  var inherit = require( 'PHET_CORE/inherit' );
  var Shape = require( 'KITE/Shape' );
  var sceneryPhet = require( 'SCENERY_PHET/sceneryPhet' );

  /**
   * @param {number} radius of the center of the reset arrow
   * @constructor
   */
  function ResetShape( radius ) {
    Shape.call( this );

    // Adjust these parameters to tweak the appearance of the arrow.
    var INNER_RADIUS = radius * 0.4;
    var OUTER_RADIUS = radius * 0.625;
    var HEAD_WIDTH = 2.25 * ( OUTER_RADIUS - INNER_RADIUS );
    var START_ANGLE = -Math.PI * 0.35;
    var END_TO_NECK_ANGULAR_SPAN = -2 * Math.PI * 0.85;
    var ARROW_HEAD_ANGULAR_SPAN = -Math.PI * 0.18;

    // Create the curved arrow shape, starting at the inside of the non-pointed end.
    // Inner edge of end.
    this.moveTo( INNER_RADIUS * Math.cos( START_ANGLE ), INNER_RADIUS * Math.sin( START_ANGLE ) );
    this.lineTo( OUTER_RADIUS * Math.cos( START_ANGLE ), OUTER_RADIUS * Math.sin( START_ANGLE ) );
    var neckAngle = START_ANGLE + END_TO_NECK_ANGULAR_SPAN;
    
    // Outer curve.
    this.arc( 0, 0, OUTER_RADIUS, START_ANGLE, neckAngle, true );
    var HEAD_WIDTHExtrusion = ( HEAD_WIDTH - ( OUTER_RADIUS - INNER_RADIUS ) ) / 2;
    this.lineTo(
      ( OUTER_RADIUS + HEAD_WIDTHExtrusion ) * Math.cos( neckAngle ),
      ( OUTER_RADIUS + HEAD_WIDTHExtrusion ) * Math.sin( neckAngle ) );
    var pointRadius = ( OUTER_RADIUS + INNER_RADIUS ) * 0.55; // Tweaked a little from center for better look.
    
    // Tip of arrowhead.
    this.lineTo(
      pointRadius * Math.cos( neckAngle + ARROW_HEAD_ANGULAR_SPAN ),
      pointRadius * Math.sin( neckAngle + ARROW_HEAD_ANGULAR_SPAN ) );
    this.lineTo(
      ( INNER_RADIUS - HEAD_WIDTHExtrusion ) * Math.cos( neckAngle ),
      ( INNER_RADIUS - HEAD_WIDTHExtrusion ) * Math.sin( neckAngle ) );
    this.lineTo(
      INNER_RADIUS * Math.cos( neckAngle ),
      INNER_RADIUS * Math.sin( neckAngle ) );
   
    // Inner curve.
    this.arc( 0, 0, INNER_RADIUS, neckAngle, START_ANGLE );
    this.close();
  }

  sceneryPhet.register( 'ResetShape', ResetShape );

  return inherit( Shape, ResetShape );
} );<commit_msg>move definition of pointRadius, phetsims/scenery-phet#230<commit_after>// Copyright 2014-2016, University of Colorado Boulder

/**
 * Shape used to indicate 'reset' of something, used on ResetButton.
 *
 * @author <NAME>
 */
define( function( require ) {
  'use strict';

  // modules
  var inherit = require( 'PHET_CORE/inherit' );
  var Shape = require( 'KITE/Shape' );
  var sceneryPhet = require( 'SCENERY_PHET/sceneryPhet' );

  /**
   * @param {number} radius of the center of the reset arrow
   * @constructor
   */
  function ResetShape( radius ) {
    Shape.call( this );

    // Adjust these parameters to tweak the appearance of the arrow.
    var INNER_RADIUS = radius * 0.4;
    var OUTER_RADIUS = radius * 0.625;
    var HEAD_WIDTH = 2.25 * ( OUTER_RADIUS - INNER_RADIUS );
    var START_ANGLE = -Math.PI * 0.35;
    var END_TO_NECK_ANGULAR_SPAN = -2 * Math.PI * 0.85;
    var ARROW_HEAD_ANGULAR_SPAN = -Math.PI * 0.18;

    // Create the curved arrow shape, starting at the inside of the non-pointed end.
    // Inner edge of end.
    this.moveTo( INNER_RADIUS * Math.cos( START_ANGLE ), INNER_RADIUS * Math.sin( START_ANGLE ) );
    this.lineTo( OUTER_RADIUS * Math.cos( START_ANGLE ), OUTER_RADIUS * Math.sin( START_ANGLE ) );
    var neckAngle = START_ANGLE + END_TO_NECK_ANGULAR_SPAN;
    
    // Outer curve.
    this.arc( 0, 0, OUTER_RADIUS, START_ANGLE, neckAngle, true );
    var HEAD_WIDTHExtrusion = ( HEAD_WIDTH - ( OUTER_RADIUS - INNER_RADIUS ) ) / 2;
    this.lineTo(
      ( OUTER_RADIUS + HEAD_WIDTHExtrusion ) * Math.cos( neckAngle ),
      ( OUTER_RADIUS + HEAD_WIDTHExtrusion ) * Math.sin( neckAngle ) );

    // Tip of arrowhead.
    var pointRadius = ( OUTER_RADIUS + INNER_RADIUS ) * 0.55; // Tweaked a little from center for better look.
    this.lineTo(
      pointRadius * Math.cos( neckAngle + ARROW_HEAD_ANGULAR_SPAN ),
      pointRadius * Math.sin( neckAngle + ARROW_HEAD_ANGULAR_SPAN ) );
    this.lineTo(
      ( INNER_RADIUS - HEAD_WIDTHExtrusion ) * Math.cos( neckAngle ),
      ( INNER_RADIUS - HEAD_WIDTHExtrusion ) * Math.sin( neckAngle ) );
    this.lineTo(
      INNER_RADIUS * Math.cos( neckAngle ),
      INNER_RADIUS * Math.sin( neckAngle ) );
   
    // Inner curve.
    this.arc( 0, 0, INNER_RADIUS, neckAngle, START_ANGLE );
    this.close();
  }

  sceneryPhet.register( 'ResetShape', ResetShape );

  return inherit( Shape, ResetShape );
} );
{'fraction_non_alphanumeric': 0.11591768164636708, 'fraction_numerical': 0.015329693406131877, 'mean_word_length': 3.0058873002523128, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5956323', 'n_tokens_mistral': 1858, 'n_tokens_neox': 1719, 'n_words': 414}