Java tutorial
//package com.java2s; public class Main { public static double roundSpeedTreshold(double val) { return (Math.floor((val + 0.000001) * 10)) / 10; } }