I doubt if any of you (or a very little amount of coders) arround here will ever use it tho ^^
|
.NET
Double To Hexadecimal Convertion [Src included] |
|
Sep 8, 2014 08:22 AM
(This post was last modified: Sep 8, 2014 09:53 AM by IAmNotHere.)
I won't use this in my code.
Have a good evening.
Sep 9, 2014 08:38 AM
(This post was last modified: Sep 9, 2014 08:40 AM by Washi.)
(Sep 8, 2014 03:37 PM)Only3 Wrote: or without structure That won't return the correct hexadecimal representation of the double, but the representation of the digit characters that make the double a readable number. Two completely different things. OT: I am not sure why this is useful actually. When would it be beneficial to write down floating point numbers as a hexadecimal string?
https://github.com/Washi1337
"I'll tell you this UDP joke, and I don't care if you will get it or not."
Sep 9, 2014 11:26 AM
(This post was last modified: Sep 9, 2014 11:29 AM by nathan72389.)
(Sep 9, 2014 08:38 AM)Washi Wrote: OT: I am not sure why this is useful actually. When would it be beneficial to write down floating point numbers as a hexadecimal string? im kinda here with ya also. although it is a good snipp of code (cant deny that). I do not see where the average coder would find this useful. The only thing that i would be able to think of would be to use it in some sort of plugin for a cheat engine type of project. Dont get me wrong, after reading the code. It absolutely looks clean enough that it should work. Personally i dont do much with anything of the nature so i dont have the exact environment to test it on. other than telling you "good job" on what you have described, and knowing your previous work, i can only say good job. Have you thought about taking this and putting it on another forum where it may be more appreciated? you may get better (not the same quantity, but better quality) advice / responses there. edited for typos and English stupid (Sep 9, 2014 08:38 AM)Washi Wrote: That won't return the correct hexadecimal representation of the double, but the representation of the digit characters that make the double a readable number. Two completely different things. 😊 Dim D = 1.12345 MsgBox(BitConverter.GetBytes(D).Reverse.SelectMany(Function(b) Hex(b)).ToArray) Or MsgBox(BitConverter.GetBytes(D).Reverse.SelectMany(Function(b) b.ToString("X2")).ToArray) (Sep 9, 2014 12:45 PM)Only3 Wrote: 😊 ...MsgBox...Really? Only3, go to your largest project, remove the Microsoft.VisualBasic Namespace, and clear out all unused references. How many errors? Your code is irrelevant googled crap until you get that down to 0...Seem fair? (Sep 9, 2014 01:32 PM)Nikey646 Wrote: ...MsgBox...Really? 😁 Console.Write(BitConverter.GetBytes(D).Reverse.SelectMany(Function(b) b.ToString("X2")).ToArray) (Sep 9, 2014 11:26 AM)nathan72389 Wrote: im kinda here with ya also. although it is a good snipp of code (cant deny that). I do not see where the average coder would find this useful. The only thing that i would be able to think of would be to use it in some sort of plugin for a cheat engine type of project. Dont get me wrong, after reading the code. It absolutely looks clean enough that it should work. Personally i dont do much with anything of the nature so i dont have the exact environment to test it on. other than telling you "good job" on what you have described, and knowing your previous work, i can only say good job. Have you thought about taking this and putting it on another forum where it may be more appreciated? you may get better (not the same quantity, but better quality) advice / responses there. I agree with that Nathan, the usage in general is not often used like this, For my personal project, the script engine, all the numbers are handled as double, so i had to make a convertion method going both ways, ofc it also understands normal hex values. example of "Hello, World" : ![]() So thats was my main reason to implement a floating point hexadecimal convertor. - B |
|
|




![[Image: KtCw7uY.png]](https://i.imgur.com/KtCw7uY.png)