EloiStree / HelloVirtualReality

Learn the basic of virtual reality (fr)
http://eloistree.com
Other
5 stars 3 forks source link

Nice to have => Stopwatch #13

Open DeMysteriis opened 6 years ago

DeMysteriis commented 6 years ago

ex :

using System.Diagnostics;

    Stopwatch watch = new Stopwatch();
    watch.Start();
    for (int i = 0; i < iteration; i++)
    {
        positionRelative = source.InverseTransformPoint(target.position);

        if (positionRelative.z > 0)
            print("The target is in front of the source");
        else
            print("The target is behind the source");
    }
    watch.Stop();
    dotProductTicks = watch.ElapsedTicks;
    dotProductMs = watch.ElapsedMilliseconds;