Math Posts

5 posts in this category

Circle and Ray Intersection
Let P be the intersection point, A is the anchor point of the ray, B is the endpoint of the ray (assuming the ray is length-limited) and C is the circle’s center point, with radius r. Now we have 3…
Math
Prime Factorization
In mathematics, the fundamental theorem of arithmetic states that: “Any integer number larger than 1 can be written as a product of prime numbers in one and only one way”. No matter how you come up…
Math
Interpolation Methods
Interpolation is a type of estimation method for finding new data points based on the range of a discrete set of known data points. The most basic kind of interpolation is Linear Interpolation (Lerp)…
Math
Count number of digits with Logarithm
Suppose that a number n has d digits, then: Because 10^d is the smallest integer with d + 1 digits. Now, take logs base 10 of this relation: This becomes: If you now take the integer part of…
Math