I know is simple and I know that is asked many times but still I couldn t find the thing I am looking for.
I have a value from 0 to 500 it is a int. I want to have an output from 0x00 to 0xFF.
public void method(int i)// 0-500
{
return the_proportional_value_in_hex_in_range_0_to_ff;
}
任何人可以把我从这种转变中带走。 增 编
EDIT
I DO NOT希望进行准确的转换,我只想进行静脉注射器转换,@Mac对我所需要的准确回答。