 Yeah, we got C. Cool. Cool. Cool. Hello guys crypto grounds here Welcome back to another adult games tour video this episode 30 today We're gonna be doing letter notation. So how this is gonna work is that for example, we have 1,000. It's going to be 1.00 a Simple as that if we have 10,000 it's gonna be 10 a okay 100,000 100 a and then a Million will be 1 B. I don't like doing the K MBT Q notation Just because it'll be inconsistent with this because then we'll have to end up like adventure communists where they do K MBT, I think it's yeah, yeah, yeah, they've tea and then they have AA BB It's because of the you know, we're using K and the already so it kind of screws everything up So I like to be consistent. So we're gonna do it that way Okay, so let's load up our Methods also, I'd like to give you warning. I am kind of going off a script I have on the side because this is really complex way more complex than you think because how this works is that we're Going completely based off of an ASCII chart. That's basically how we get the letters So we convert a number into a letter. That's not the link. I wanted so here. We have this ASCII table right here and then Let's see. So, yeah, where I don't want to download this. I never said I wanted to download this Okay, so you see we have zero for like all this good stuff. So 48 0 49 is 1 81 is capital Q 1 1 3 is lowercase q. So we are going from 97 to 122 and we're kind of just looping it that way and we do that by doing a modulus, okay? So I do this on the side here. It's really complicated but They basically this supports up to So basically this goes up to e 6087 I believe hopefully that's correct if not then I don't know where my math's coming from But it should support up to e 6087 which is plenty plenty Okay, so let's start this so it's gonna be in our notation method It's gonna be a little more complex than before. Okay, so there's two things we need to look for we need to look for our exponent for normal scientific notation and our Engineering notation so we will have Exponent and honestly we can calculate these up here So let's just Let's just bring this down here So we're gonna set exponent equal to so this is gonna be Scientific notation and then we're gonna do engineering notation right here and that's this right here So we already have our stuff right some of our stuff ready Also, don't forget the return actually we'll get there. Okay, so now we need to calculate our first letter So we're gonna call this bar letter one Okay, and we're gonna set this equal to we're gonna two string this at the end Okay, so now we do we're gonna cast this as a char actually I'll do that at the end I want to kind of explain through this so This is it's just all right out here. I'm like how I remember this It's math that floor And I it took me so long to actually make this I could not find this online. I had to do this all myself So this is the edge notator exponent To double You know, actually since we fix the two double issue we can just cast as a double instead Okay Then we do minus three times 26 and that's how many letters are in the alphabet And we divide this by three times 23 because we want this to happen every three Decimals and then we do mod 26. So it resets between the letters And that's plus 97 because we want to start at 97 Where is it? Where is it right here? We won't start at 97 and Yeah, that's oh, that's not it yet. Okay We could convert this but we need to convert it to char a char first Because we're getting an ASCII number and this would basically just convert a number into a string We don't want to do that. So we just can do it like this We put the parentheses around the entire thing. We cast this inner math equation here and we It's as a char and then we grab this whole thing convert back to a string and we have our first letter Okay, so now we want to calculate a second letter only if it needs only if it's needed so we just do we have an if statements and we can do if engineering notation dot or again, we can cast the double Okay divide by three Is greater than 27 Greater equal than 27. I could have just done scientific scientific notation. That's okay Uh, no, that would work because this is yeah, never mind. I ignore what I'm saying Okay, now we're gonna we're gonna calculate another letter and honestly, I don't think we're gonna need a third letter I didn't even do it here and I don't even use letter in my game because I don't think any of my players use it because it's kind of weird But we do the same thing right here Okay Except it's a little more complex. So okay, so instead of subtract by three. Oh, okay. I messed up something right here Okay, so this is the actually this is actually the calculation for letter two. This is the calculation for Letter one my mistake And it looks like I have one too many parentheses We can get rid of this cool This is the right one for down here. Okay, this one is just reduced to lie quite a bit Okay, so this is calculating the second letter. This is calculating the first letter. So now what we do Is we return Our x we divided by big double dot pow times 10 engineering Oh, so one thing I'm looking back at this and I forgot this is actually why we need the scientific is that we actually do it here Okay So We take we do floor. Yeah. Okay. This is this basically just reduces some of this work We have to do So we take our scientific notation right here. We divided by three Okay Um, and yeah, we don't need to add this. I don't actually I think we do I'm just gonna keep it anyways Okay, so that's what engineering is this Okay, this kind of just makes things a little smaller Um, okay, so then we divide this by uh, yeah, two straight. We're gonna two string this So we do x divided by big double pow this right here. We're getting our exponent here Or this is our mantisa two string And then our digits which is y And then we add letter two And letter one. Oh, yeah, this is just pow For my case because i'm using big doubles and I simplified it earlier people still kind of get confused by that Okay, so let's see Why does this work? Okay, so for example, let's say our mantisa is 3.55. Okay It's uh, this word is scientific for this one. Actually, you know, let's do 3.55 a. Okay, which basically this is 3550 Okay, so how do we get this? So we divide it by the engineering which is three So, uh, nope. It's 10 to the power of three 10 to the power of three. Okay That's our engineering notation What does it look like it's gonna want? Oh, yeah And here we should get 3.55 Yep, there we go. So that's how that works right here That's basically what we're doing right here. And then we have and then we're adding the letters instead of the exponents All right, so now outside of this we need to do we need to check if this number is even greater than 1,000 anyways, so we do x greater than 1,000 If it is then we're going to return this exact same thing, but just with letter 1 Okay, because we don't need letter 2 That happens in here if it's even true. Okay And now last but not least if it's not true, then we're just going to return number or our number which is x and then we're going to do a two string and we have our digits, which is y And that's it. Okay Also, this is why This is why two Cool, so we have our notation method for all three of them. Let's give it a test I mean again, it may look weird at first But this is why it's not a good notation at all in the first place This is kind of just like a bonus tutorial, I guess Okay, so we have our side. We have our engineer right now. So this should show up as a instead Let's check it out. So let's go to our settings. We let our notation Back. All right. So now it's 100 a Let's reset Okay, so we're approaching a thousand So now it should be 1a Cool. So the thing that we're having issues with is that it's not showing the decimals Why is that okay? Well, I'm just going to put up two in here. I don't know what I did But I don't want I don't want one decimals. I'm just going to put it like that Ah I hate unity so much This better work, bro. So I'm gonna be mad at unity. Okay, we're good Yeah, sometimes when you get these errors that nothing happens, you just gotta reload your game Okay, so we go we have our decimals. I guess I had two string No, I don't even know what happened there. So this is 3,750 right now. So let's get things started Okay, so now we should get okay, so we're going to speed things up So let's go to our game manager. So there should be 10 Yep, cool. All right. So that's e4 e5 e6 Oh E6 e7 e8 e9. Oh, it's skipping letters. That's not good. Okay, we're having okay, so What are we doing wrong? We're skipping letters already Okay, I see the issue. We're not dividing by three here still Okay, so we just do divide by three And we add another parentheses right here Okay, so oh, that's not it's redundant. Okay So when we divide by three, we're skip. So when we're not dividing by three We're skipping three every three little or letters, right? So now Because a d that's a three letter jump, right? So now this so this is g. This should be c once we reload this All about trial and error Okay, this should work Yeah, we got c Cool, cool, cool. So now any text you use even if you go to planets, you'll see this notation here, right? That's the really cool thing about the settings is that every single text that uses a notation in the first place Will be replaced with this if we go back to scientific notation We got scientific if we want letter notation. We got letter notation if we go back to planets I think oh, I don't like this. Let's go to scientific or engineering notation. There we go. It's e9 We have regular letter notation Uh scientific notation Yeah, I okay, I don't know why it's not showing up. I think I just accidentally changed that Um, but yeah So anyways, I hope you guys enjoyed this video if you did make sure you smash a like Subscribe to my channel if you're new and turn on the notifications and comment your suggestions below I'll be accepting any I need to post more often I'm kind of inactive lately because I've been full rush mode on crypto clickers because I'm working on something big All right. Anyways, thank you for watching