Tag: C#
All the articles with the tag "C#".
There Are Two Clamps: Swap the Arguments and Only One Throws
Mathf.Clamp takes four lines to explain. The trouble is everything outside those four lines: what happens when you swap the bounds, when NaN arrives, and when you clamp an angle.
Unity's Code Optimization Page Is a Table of Contents of Tables of Contents
Unity's Code optimization manual page is five links and nothing else. Four of those five are tables of contents too. Here is what's left after descending to the leaves — only the parts that actually change code.
One Read Is Not One Message
I saved the TcpListener.AcceptTcpClient documentation. Its example treats TCP as a stream of messages, and another page in the same doc set carries a fixed version of it.
What FreezePositionY Freezes Is World Y
I checked a write-up on RigidbodyConstraints against the manual. Four enum members are missing, there's nothing about which axis it freezes relative to, and the bitwise explanation is wrong in two places.