private float calculateAngleSpacing(float radius,float halfChildSize){
  float desiredSpace=getDimension(R.dimen.material_button_spacing) + 2 * halfChildSize;
  float cosRatio=((desiredSpace * desiredSpace) - 2 * (radius * radius)) / (-2 * radius * radius);
  float radians=(float)Math.acos(cosRatio);
  return (float)Math.toDegrees(radians);
}

private float calculateAngleSpacing ( float radius , float halfChildSize ) { float desiredSpace = getDimension ( R . dimen . material_button_spacing ) + 2 * halfChildSize ; float cosRatio = ( ( desiredSpace * desiredSpace ) - 2 * ( radius * radius ) ) / ( - 2 * radius * radius ) ; float radians = ( float ) Math . acos ( cosRatio ) ; return ( float ) Math . toDegrees ( radians ) ; }
calculates the angle spacing required to get a spacing of 16 dp between buttons . this is based on the equation a ^ 2 + b ^ 2 - 2abcos ( th ) = c ^ 2
