I like to build cool things, work with nice people and help others where I can. Currently I'm an engineering manager for a fintech startup and historically a serial founder & freelancer software dev.
Location
München, Deutschland 🇩🇪
Education
The Open University
Work
Engineering Manager @ Deutsche Fintech Solutions GmbH
For sure, ~~ is being used here in place of Math.floor() to remove the decimals from the number. It is a habit i got into as it is slightly faster and a bit more terse, but honestly it's probably not the best for readability!
I'm actually not sure why I added it there now, perhaps I was planning on stripping the decimals from the values to make the SVG markup a little nice when inspecting, but I didn't follow through in the rest of the pen :)
I like to build cool things, work with nice people and help others where I can. Currently I'm an engineering manager for a fintech startup and historically a serial founder & freelancer software dev.
Location
München, Deutschland 🇩🇪
Education
The Open University
Work
Engineering Manager @ Deutsche Fintech Solutions GmbH
I see, curiously, and maybe you don't have the answer but: I assume ~ does one things and ~~ does another? Like ! and !! for example. Do you know what that difference is though?
Oof, that's about the limits of my knowledge I'm afraid. I know that you are correct in saying a single tilde does another thing, but I have no idea what!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Again, some awesome work dude, you’re really good at this kind of thing!
One question, I’ve never used the
~~
operator before, can you explain what you use that for perhaps?Ah, thanks so much James!
For sure,
~~
is being used here in place ofMath.floor()
to remove the decimals from the number. It is a habit i got into as it is slightly faster and a bit more terse, but honestly it's probably not the best for readability!I'm actually not sure why I added it there now, perhaps I was planning on stripping the decimals from the values to make the SVG markup a little nice when inspecting, but I didn't follow through in the rest of the pen :)
I see, curiously, and maybe you don't have the answer but: I assume
~
does one things and~~
does another? Like!
and!!
for example. Do you know what that difference is though?Oof, that's about the limits of my knowledge I'm afraid. I know that you are correct in saying a single tilde does another thing, but I have no idea what!