-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce Plane
invariants via private fields & setters
#994
Comments
This is also true to a lesser extent for
Considering this, I'm always asking myself: what do we lose if we validate?
Not directly related, but GDScript has the tendency to use questionable values to represent "invalid" states, since it doesn't support real error handling, e.g.
These are not violating invariants of the type itself, but may surprise users. |
I think the presence of
If so, then it should be a documentation error on our side indeed.
This is in fact the main concern of mine regarding the input validation problem: the overall API surface is huge, and there might just be some method that use the types in an undocumented way. In other words, it might be the situation that there's something we think is an invariant but is actually not. Also related is the problem of floating point drift, where in a series of operations small errors add up and eventually become larger than |
Created during survey of commented code (#377).
There are a number of invariants expected mathematically of the
Plane
type, that cannot currently be enforced due to the fields being public.A few issues to consider:
A test should also be added for
contains_point_eps
.The text was updated successfully, but these errors were encountered: