Java Franction Convert fractionalPart(float fnum)

Here you can find the source of fractionalPart(float fnum)

Description

fractional Part

License

Open Source License

Declaration

static float fractionalPart(float fnum) 

Method Source Code

//package com.java2s;
/*  Copyright (c) 2016//from   w w w . j  av  a2  s .co  m
 *  by Bj?nd, Inc., Boston, MA
 *
 *  This software is furnished under a license and may be used only in
 *  accordance with the terms of such license.  This software may not be
 *  provided or otherwise made available to any other party.  No title to
 *  nor ownership of the software is hereby transferred.
 *
 *  This software is the intellectual property of Bj?nd, Inc.,
 *  and is protected by the copyright laws of the United States of America.
 *  All rights reserved internationally.
 *
 */

public class Main {
    static float fractionalPart(float fnum) {
        int wholePart = wholePart(fnum);
        return fnum - wholePart;
    }

    static int wholePart(float num) {
        return (int) num;
    }
}

Related

  1. fraction(StringBuilder buf, int scale, long ms)
  2. fractionAlongRay(double px, double py, double qx, double qy, double rx, double ry)
  3. fractionalTime(int hour, int minute, int second)
  4. fractionDigits(double number)
  5. fractionOfStringUppercase(String input)
  6. fractionToDecimal(String fraction)