Open simon-brooke opened 2 years ago
@simon-brooke thanks for reaching out! It seems that I did not test it well enough, I'm happy to accept PR for that one 🙌🏻
OK, I'm working on a lot of documentation. I'll drop you at least one pull request later this weekend. Would you prefer
One pull request should be fine I think 👍🏻
OK, I'm running slower than I'd like, the weekend's over. But I'm working on it. You can get a view of progress on my fork, which is here.
Wow, looks so cool. It seems that you put so much effort!
@simon-brooke it seems that linting is broken on master after the PR, could you check and fix it, please?
What are you seeing/which linter are you using? If the problem is
At src/jme_clj/core.clj:null:
Consider using:
and
instead of:
#(and %1 %2)
(reported by Kibit), the following patch fixes it. It's also better, more idiomatic code. Shall I submit a new pull request?
illuminator:jme-clj simon$ git diff
diff --git a/src/jme_clj/core.clj b/src/jme_clj/core.clj
index 9307b96..156eec5 100644
--- a/src/jme_clj/core.clj
+++ b/src/jme_clj/core.clj
@@ -307,7 +307,7 @@
(Quaternion.))
([x y z]
(cond (and (instance? Quaternion x) (instance? Quaternion y) (number? z)) (Quaternion. x y z)
- (reduce #(and %1 %2) (map number? [x y z])) (Quaternion. x y z 1.0)))
+ (every? number? [x y z]) (Quaternion. x y z 1.0)))
([^Float x ^Float y ^Float z ^Float w]
(Quaternion. x y z w)))
Yes please
did you run lein lint
?
My apologies, I appear to have missed this. I have now run lint, and added a new commit to the pull request; there are eleven remaining instances of 'long lines' failures, but each of these is due to a link which cannot be broken or shortened.
The signature of
quat
, for three arguments, is[^Float x ^Float y ^Float z]
. This would lead the innocent programmer to believe that numbers are expected, but in fact they're not.This is because the arity three constructor for Quaternion expects two quaternions and a float.
I suspect what you intended could be achieved by: