Java Bit Shift shift(int component, int shift)

Here you can find the source of shift(int component, int shift)

Description

Bit shifts a color component, loosing the less significant bits

License

Open Source License

Parameter

Parameter Description
component a parameter
shift a parameter

Declaration

public static int shift(int component, int shift) 

Method Source Code

//package com.java2s;
/* Copyright (c) 2001, 2007 TOPP - www.openplans.org. All rights reserved.
 * This code is licensed under the GPL 2.0 license, availible at the root
 * application directory.//from w ww .j  a va2s  . c o  m
 */

public class Main {
    /**
     * Bit shifts a color component, loosing the less significant bits
     * 
     * @param component
     * @param shift
     * @return
     */
    public static int shift(int component, int shift) {
        return component >> shift;
    }
}

Related

  1. shift(int a, int b)
  2. shift(int direction, long sq, int delta)
  3. shift(int length)
  4. shift(String string)
  5. shiftBits(byte b)