Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
An iOS dev's intro to graphics, and a graphics engineer's intro to ARKit (medium.com/maxxfrazer)
74 points by maxxfrazer on Nov 3, 2018 | hide | past | favorite | 2 comments


Cool. Just a bit of quick feedback:

1. It would be much nicer if you posted actual code instead of screenshots.

2. You can drop "CGFloat" in "CGFloat.pi", since Swift will figure it out for you.

3. sin is generic on FloatingPoint, so you shouldn't have to use sinf–sin should do fine.


Hey! Thanks for the feedback

On my first tutorial I did post the code, but the code viewer on Medium is a bit crappy; this way I can make it look a bit nicer, while referencing the GitHub repo as often as I can near the screenshots.

Taking out CGFloat would be good, I was trying to make everything as clear as possible but it might not be necessary there.

When I first tried just sin it was actually telling me that it only accepts Double and suggested sinf to me, I'll Double check that though (pun intended)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: