-
Notifications
You must be signed in to change notification settings - Fork 98
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
Adding Torque #117
Comments
Kind serves two purposes in The definition should probably look like this: pub trait TorqueKind: // still haven't done any research to see what the appropriate name would be.
marker::Add + marker::AddAssign
+ marker::Sub + marker::SubAssign
+ marker::Mul + marker::MulAssign
+ marker::Div + marker::DivAssign
+ marker::Rem + marker::RemAssign
+ marker::Neg + marker::Saturating
{
} This all works because |
That makes sense, and it's consistent with my edit above. The next question, then, is how are lines like
supposed to compile? Right now it's giving me a type mismatch on account of Torque's kind (using the example kind you supplied). |
|
…turtles#117 (and finishes the request in iliekturtles#114).
This is a continuation of #114 (which will be closed when #115 goes in) that adds Torque.
I'm starting to look at adding torque, but I have a question. Over in #114 you mentioned that the new
Kind
will likely want to implement all of the marker traits, but I'm not sure I understand why you said that. What would it mean to divide a torque by an energy? (for example)Edit: I think I've figured out the answer to my own question (I'd still appreciate confirmation though). I think it never derives inter-Kind mathematical operators. If that's the case, may I suggest changing the docs on the markers? "Trait to denote that a quantity is able to be X with a quantity of the same dimensions." makes it sound like the Kind isn't taken into account.
The text was updated successfully, but these errors were encountered: