CCT.NUI.WPFSamples.KinectTouchWindow.Scale C# (CSharp) 메소드

Scale() 개인적인 정적인 메소드

private static Scale ( int maxPixel, float maxSkeleton, float position ) : float
maxPixel int
maxSkeleton float
position float
리턴 float
        private static float Scale(int maxPixel, float maxSkeleton, float position)
        {
            float value = (((((float)maxPixel) / maxSkeleton) / 2f) * position) + (maxPixel / 2);
            if (value > maxPixel)
            {
                return (float)maxPixel;
            }
            if (value < 0f)
            {
                return 0f;
            }
            return value;
        }