How to get dot product between -1 and 1 in Objective-C
===

In C# I have the following code:

    Vector2.Dot(ref tmpDirection, ref direction, out result);

This returns a float between -1 and 1. I am curious how to get this same functionality in Objective-C. I know you can calculate the dot product of two vectors like so:

    CGPoint point1 = CGPointMake(10, 10);
    CGPoint point2 = CGPointMake(20, 20);
    float dotProduct = point1.x * point2.x + point1.y + point2.y;

What I do not understand is what the C# function does to make the result between -1 and 1 as normal dot product math can result in any number.