I keep running into issues when using math on numbers
CS0266: Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?)
(x * y * 60) / z
I've tried casting and it doesn't seem to fix anything
((double)x * (double)y * 60) / (double)z
float x = 10; float y = 2; double z = 0;
my question is can i make the compiler ignore this error and just perform math?
i'm not worried about overflowing bc i have the types the way they are bc the compiler complains until i make sure the type matches when i'm assigning the properties values from another class
update so the compiler stopped complaining when i made the variable i'm setting a double
works: double a = (x * y * 60) / z
a was a float and so it was getting stuck on z a double