Answer the question
In order to leave comments, you need to log in
How to correctly describe a method that finds the area of a circle given a given radius?
Describe a method that calculates the area of a circle given a given radius. Returns a fractional number.
I can't figure out how to properly describe this method, my code is below:
void Start()
{
float circle =Mathf.PI;
float R= 3;
float result=GetSquareofcircle(R);
Debug.Log(result);
}
float GetSquareofcircle(float R)
{
float circlesquare = Mathf.PI *Mathf.Pow(R,R);
return(circlesquare);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question