Java tutorial
//package com.java2s; import android.graphics.PointF; public class Main { /** * This method normalize specified vector. * * @param point {@link PointF} */ public static void normalizeVector(PointF point) { final float abs = point.length(); point.set(point.x / abs, point.y / abs); } }