当前位置:网站首页>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
边栏推荐
- Reinforcement learning - learning notes 4 | actor critical
- Using repositoryprovider to simplify the value passing of parent-child components
- Debezium系列之:记录mariadb数据库删除多张临时表debezium解析到的消息以及解决方法
- Is it safe for Anxin securities to open an account online?
- Is it safe to open a mobile stock account? Is it reliable?
- 【obs】libobs-winrt :CreateDispatcherQueueController
- Password reset of MariaDB root user and ordinary user
- Force buckle 729 My schedule I
- HiEngine:可媲美本地的云原生内存数据库引擎
- 如何安全快速地从 Centos迁移到openEuler
猜你喜欢
[FAQ] summary of common causes and solutions of Huawei account service error 907135701
如何实现游戏中的在线计时器和离线计时器
Django使用mysqlclient服务连接并写入数据库的操作过程
Microwave radar induction module technology, real-time intelligent detection of human existence, static micro motion and static perception
四万字长文说operator new & operator delete
PHP利用ueditor实现上传图片添加水印
建议收藏,我的腾讯Android面试经历分享
【obs】QString的UTF-8中文转换到blog打印 UTF-8 char*
力扣 1200. 最小绝对差
aggregate
随机推荐
Using repositoryprovider to simplify the value passing of parent-child components
Debezium系列之:解析默认值字符集
MMO project learning 1: preheating
MySQL中字段类型为longtext的值导出后显示二进制串方式
Webuploader file upload drag upload progress monitoring type control upload result monitoring control
webuploader文件上传 拖拽上传 进度监听 类型控制 上传结果监听控件
力扣 729. 我的日程安排表 I
不愧是大佬,字节大牛耗时八个月又一力作
Float.floatToRawIntBits的返回值具体意思,将float转为byte数组
How to apply smart contracts more wisely in 2022?
Postman核心功能解析-参数化和测试报告
测试的核心价值到底是什么?
Worthy of being a boss, byte Daniel spent eight months on another masterpiece
使用easyexcel模板导出的两个坑(Map空数据列错乱和不支持嵌套对象)
司空见惯 - 英雄扫雷鼠
软件测试工程师是做什么的?待遇前景怎么样?
How MySQL queries and modifies JSON data
什么是面上项目
Debezium系列之:记录mariadb数据库删除多张临时表debezium解析到的消息以及解决方法
100million single men and women supported an IPO with a valuation of 13billion