Why can't I do this?
Thanks for any help.
Code that works:
public class Practice : MonoBehaviour
public float tax;
public float taxRate = .0825f;
public float subTotal = 20.00f;
// Use this for initialization
void Start ()
void Update ()
if (Input.GetKeyDown (KeyCode.Space))
tax = TaxFinder(subTotal, taxRate); //Want to replace w/ (20.00, .0825)
Debug.Log ("Tax: " + tax);
public float TaxFinder(float subTotal, float taxRate)
return (subTotal * taxRate);