_getPath(percent) {
		const halfPI = Math.PI / 2;
		const thetaRad = percToRad(percent / 2); // half circle

		const centerX = 0;
		const centerY = 0;

		// shorten butt-ended +/- 0.01
		const topXleft = centerX - ( this._length * Math.cos(thetaRad - 0.01 ) );
		const topYleft = centerY - ( this._length * Math.sin(thetaRad - 0.01 ) );
		const topXright = centerX - ( this._length * Math.cos(thetaRad + 0.01 ) );
		const topYright = centerY - ( this._length * Math.sin(thetaRad + 0.01 ) );

		// move needle base slightly from circle center (+/- 0.25) and widen gap to touch circle tangent (+ 0.35)
		const leftX = centerX - ( (this._radius + 0.35) * Math.cos(thetaRad - halfPI + 0.25) );
		const leftY = centerY - ( (this._radius + 0.35) * Math.sin(thetaRad - halfPI + 0.25) );
		const rightX = centerX - ( (this._radius + 0.35) * Math.cos(thetaRad + halfPI - 0.25) );
		const rightY = centerY - ( (this._radius + 0.35) * Math.sin(thetaRad + halfPI - 0.25) );

		return `M ${leftX} ${leftY} L ${topXleft} ${topYleft} L ${topXright} ${topYright} L ${rightX} ${rightY}`;
	}
/**
	* Gets the needle path based on the percent specified.
	*
	* @param percent The percentage to use to create the path.
	* @returns {string} A string associated with the path.
	* @private
	*/
Gets the needle path based on the percent specified.
@param percent The percentage to use to create the path.
@returns {string} A string associated with the path.
@private
Gets the needle path based on the percent specified . @param percent The percentage to use to create the path . @returns { string } A string associated with the path . @private
_getPath(percent) {
		const halfPI = Math.PI / 2;
		const thetaRad = percToRad(percent / 2); 
		const centerX = 0;
		const centerY = 0;
		const topXleft = centerX - ( this._length * Math.cos(thetaRad - 0.01 ) );
		const topYleft = centerY - ( this._length * Math.sin(thetaRad - 0.01 ) );
		const topXright = centerX - ( this._length * Math.cos(thetaRad + 0.01 ) );
		const topYright = centerY - ( this._length * Math.sin(thetaRad + 0.01 ) );
		const leftX = centerX - ( (this._radius + 0.35) * Math.cos(thetaRad - halfPI + 0.25) );
		const leftY = centerY - ( (this._radius + 0.35) * Math.sin(thetaRad - halfPI + 0.25) );
		const rightX = centerX - ( (this._radius + 0.35) * Math.cos(thetaRad + halfPI - 0.25) );
		const rightY = centerY - ( (this._radius + 0.35) * Math.sin(thetaRad + halfPI - 0.25) );
		return `M ${leftX} ${leftY} L ${topXleft} ${topYleft} L ${topXright} ${topYright} L ${rightX} ${rightY}`;
	}
_getPath ( percent ) { const halfPI = Math . PI / 2 ; const thetaRad = percToRad ( percent / 2 ) ; const centerX = 0 ; const centerY = 0 ; const topXleft = centerX - ( this . _length * Math . cos ( thetaRad - 0.01 ) ) ; const topYleft = centerY - ( this . _length * Math . sin ( thetaRad - 0.01 ) ) ; const topXright = centerX - ( this . _length * Math . cos ( thetaRad + 0.01 ) ) ; const topYright = centerY - ( this . _length * Math . sin ( thetaRad + 0.01 ) ) ; const leftX = centerX - ( ( this . _radius + 0.35 ) * Math . cos ( thetaRad - halfPI + 0.25 ) ) ; const leftY = centerY - ( ( this . _radius + 0.35 ) * Math . sin ( thetaRad - halfPI + 0.25 ) ) ; const rightX = centerX - ( ( this . _radius + 0.35 ) * Math . cos ( thetaRad + halfPI - 0.25 ) ) ; const rightY = centerY - ( ( this . _radius + 0.35 ) * Math . sin ( thetaRad + halfPI - 0.25 ) ) ; return ` ${ leftX } ${ leftY } ${ topXleft } ${ topYleft } ${ topXright } ${ topYright } ${ rightX } ${ rightY } ` ; }
Gets the needle path based on the percent specified.
Gets the needle path based on the percent specified .
// half circle // shorten butt-ended +/- 0.01 // move needle base slightly from circle center (+/- 0.25) and widen gap to touch circle tangent (+ 0.35)