Gives the fractional part of a number : Float « Date Type « Android






Gives the fractional part of a number

    

public class Main{
  //
  // Frac: Gives the fractional part of a number
  static double Frac(double x) {

    return x - (long) x;
  }

}

   
    
    
    
  








Related examples in the same category

1.Convert a float to 16.16 fixed-point representation
2.Convert a 16.16 fixed-point value to floating point
3.Random and Roundup
4.Is Long or double
5.calculate NormDiff
6.DecimalFormat, Maximum Fraction Digits
7.Format Distance
8.Close to a value
9.Value equals in a range, and ensure value inside a range
10.scale, round Number
11.Returns the smallest power of two that is greater than