<
if (projXmove >= (displayWidth/75)/sqrt(1+(projSlope)(projSlope))) {
projXmove = (displayWidth/75)/sqrt(1+(projSlope)(projSlope));
}
When I try to run this within my program I get the error message “The operator + is undefined for the argument type(s) int, projSlope”
I’m not sure what that means. I feel it may be related to trying to use 1 as an integer value with float type variables, but i’m not otherwise sure how I would fix this.
@glv thanks for the comment about formatting, forgot about that
Sorry my answer was incomplete. Since you are performing maths the + sign expects a numeric literal or numeric variable for both arguments so I suspect that the variable projSlope is not a numeric variable.