当前位置:网站首页>Float. The specific meaning of the return value of floattorawintbits is to convert float into byte array
Float. The specific meaning of the return value of floattorawintbits is to convert float into byte array
2022-07-05 19:40:00 【It's hard not to write code all day】
Catalog
1 Code
int i = Float.floatToRawIntBits(9f);
2 explain
What is returned is the decimal number of the floating-point number of the value .
3 When to use this
We need to turn a two-dimensional array into a picture , Generally used byte transformation , That is to say, first put the float Use this for the value of Float.floatToRawIntBits(9f)
To int,
after
public static byte[] getBytes(int Float.floatToRawIntBits(x)) {
return new byte[] {
(byte) x, (byte) (x >>> 8), (byte) (x >>> 16),
(byte) (x >>> 24) };
}
such as Incoming x by 1.0f
Output is
[0, 0, -128, 63]
The above will realize float To byte Array
边栏推荐
- Is it safe for Anxin securities to open an account online?
- Force buckle 1200 Minimum absolute difference
- [hard core dry goods] which company is better in data analysis? Choose pandas or SQL
- 5 years of experience, 27 days of Android programmer interview, 2022 programmer advanced classic
- 大厂面试必备技能,2022Android不死我不倒
- 完爆面试官,一线互联网企业高级Android工程师面试题大全
- 关于 Notion-Like 工具的反思和畅想
- 【obs】libobs-winrt :CreateDispatcherQueueController
- 太牛了,看这篇足矣了
- Add data to excel small and medium-sized cases through poi
猜你喜欢
Necessary skills for interview in large factories, 2022android will not die, I will not fall
Can Leica capture the high-end market offered by Huawei for Xiaomi 12s?
再忙不能忘安全
MMO项目学习一:预热
详解SQL中Groupings Sets 语句的功能和底层实现逻辑
测试外包公司怎么样?
What are the reliable domestic low code development platforms?
Add data to excel small and medium-sized cases through poi
S7-200SMART利用V90 MODBUS通信控制库控制V90伺服的具体方法和步骤
The relationship between temperature measurement and imaging accuracy of ifd-x micro infrared imager (module)
随机推荐
Password reset of MariaDB root user and ordinary user
Android interview, Android audio and video development
Fuzor 2020软件安装包下载及安装教程
JAD installation, configuration and integration idea
Millimeter wave radar human body sensor, intelligent perception of static presence, human presence detection application
MMO項目學習一:預熱
再忙不能忘安全
third-party dynamic library (libcudnn.so) that Paddle depends on is not configured correctl
IFD-x 微型红外成像仪(模块)关于温度测量和成像精度的关系
通配符选择器
Two pits exported using easyexcel template (map empty data columns are disordered and nested objects are not supported)
什么是面上项目
打新债在哪里操作开户是更安全可靠的呢
What is the core value of testing?
如何安全快速地从 Centos迁移到openEuler
Realizing deep learning framework from zero -- LSTM from theory to practice [practice]
【无标题】
司空见惯 - 英雄扫雷鼠
Debezium系列之:postgresql从偏移量加载正确的最后一次提交 LSN
aggregate