In this Blog Entry I will translate examples from the tutorial Math for Game Developers from C++ to C# and TypeScript. I will add unit tests to the examples.
I use:
- NUnit and NSubstitute for C#
- Jasmine for TypeScript
C# and TypeScript are very similar. TS has: properties and generics. TS has keywords like C#: interface, abstract (for classes and methods). Author of C# and TS is Anders Hejlsberg
001. Character Movement (Points and Vectors)
TypeScript
- TypeScript Demo: Click to run the example in Sandbox
- TypeScript Source Code: 001_PointsAndVectors
C#
- C# Source Code: 001_PointsAndVectors
Cool! I just bought one book about Maths in Game Development and your channel is very interesting.