-
Notifications
You must be signed in to change notification settings - Fork 97
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
AngleKind errors when multiplying by f64s #138
Comments
Issue is that the // Will work as expected
let a: Angle = 5.0 * Angle::new::<radian>(1.0);
// Should `b` have a kind of `AngleKind`?
let b = 5.0 / Angle::new::<radian>(1.0); Patch to fix issue: diff --git a/src/system.rs b/src/system.rs
index fa0122c..87a8a04 100644
--- a/src/system.rs
+++ b/src/system.rs
@@ -510,7 +510,8 @@ macro_rules! system {
$quantities<
$($crate::typenum::$AddSubAlias<
$crate::typenum::Z0,
- D::$symbol>,)+>,
+ D::$symbol>,)+
+ D::Kind>,
U, V>;
#[inline(always)] |
I think so, because
had better be an |
Lines 464 to 471 in def7d69
I'll get the patch above committed and merged once the build completes. I'll also see about releasing a new version today or tomorrow before I lose internet access for a bit. |
`1.0 * Q` and `1.0 / Q` now both maintain Q's kind in the result. `Q * 1.0` and `Q / 1.0` already maintain the kind. Resolves #138.
Awesome, thanks! |
`1.0 * Q` and `1.0 / Q` now both maintain Q's kind in the result. `Q * 1.0` and `Q / 1.0` already maintain the kind. Resolves #138.
It looks like we missed something:
throws Kind mismatch errors, apparently floats times quantities always returns a regular Kind rather than AngleKind. I'm going to look for a fix, if you don't see a PR in the next day or two assume that I got stuck somewhere and could use a hint.
The text was updated successfully, but these errors were encountered: