Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
You need to work on your chocolate milk consumption... At 3am? You're asking for an ulcer
-
@seraphimsystems Never doubt the chocolate milk! Joke aside, i think it's not such a bad alternative to coffee, at least talking about 3 am..
-
Could it be that you are comparing two floating point numbers?
Normally you compare two floats by giving it a small range where you define they are equal.
let a: number;
let b: number;
let ɛ: number = 0.00002; // ±range for comparison
floateq(a, b, ɛ) {
return b - ɛ <= a && a <= b + ɛ;
} -
@PonySlaystation Nah I know you can't plainly compare floats, this was a degrees vs radians problem.
-
This made me feel better about trying to get Bazel to compile my app for 6 hours.
Every programming language I know of does trigonometry in radians.
Yet I have been puzzled for 4 hours whether JS was broken because it kept saying Math.sin(30) != Math.sin(150), trying all kinds of values, looking up basic trigonometry stuff again and again.
After that, 10 minutes of wondering why my json was invalid... right, you can't comment things out.
Then 15 minutes being baffled by a simple script tag not working, because I wrote script href instead of script src.
Finally, I threw a liter of chocolate milk over a $400 keyboard.
I really need to stop setting up new projects at 3am.
rant