public ThrowSummary GetThrowSummary(double _xCoord, double _yCoord) { var point = new NormalizedPoint(); point.xCoord = _xCoord; point.yCoord = _yCoord; return(GetThrowSummary(point)); }
public int GetPoints(NormalizedPoint _point) { var distance = DistanceToCenter(_point); if (distance > 1.0) { return(0); } var multiplicator = GetDistanceMultiplicator(distance).multiplicator; return(multiplicator >= 25 ? multiplicator : multiplicator *GetPointsForAngle(GetAngle(_point)).points); }
public bool HitTheBoard(NormalizedPoint _point) { return(DistanceToCenter(_point) < 1.0); }
public double DistanceToCenter(NormalizedPoint _point) { return(Math.Sqrt((_point.xCoord * _point.xCoord) + (_point.yCoord * _point.yCoord))); }
public ThrowSummary GetThrowSummary(NormalizedPoint _point) { return(new ThrowSummary(_point.xCoord, _point.yCoord, DistanceToCenter(_point), HitTheBoard(_point), GetDistanceMultiplicator(DistanceToCenter(_point)).multiplicator, GetAngle(_point), GetPointsForAngle(GetAngle(_point)).points, GetPoints(_point))); }
public double GetAngle(NormalizedPoint _point) { var preVal = GetAtanInDegrees(_point); return(preVal < 0.0 ? 360 + preVal : preVal); }
public double GetAtanInDegrees(NormalizedPoint _point) { return(GetAtanInRads(_point) * (180.0 / System.Math.PI)); }
public double GetAtanInRads(NormalizedPoint _point) { return(Math.Atan2(GetSin(_point), GetCos(_point))); }
public double GetCos(NormalizedPoint _point) { return(ZeroDegreeHorizonVector().xCoord + _point.xCoord + ZeroDegreeHorizonVector().yCoord + _point.yCoord); }
public double GetSin(NormalizedPoint _point) { return(ZeroDegreeHorizonVector().xCoord *_point.yCoord - _point.xCoord * ZeroDegreeHorizonVector().yCoord); }