All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.trilarion.jcraft.jorbis.Util Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package com.github.trilarion.jcraft.jorbis;

class Util{
  static int ilog(int v){
    int ret=0;
    while(v!=0){
      ret++;
      v>>>=1;
    }
    return (ret);
  }

  static int ilog2(int v){
    int ret=0;
    while(v>1){
      ret++;
      v>>>=1;
    }
    return (ret);
  }

  static int icount(int v){
    int ret=0;
    while(v!=0){
      ret+=(v&1);
      v>>>=1;
    }
    return (ret);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy