Expand ZScript ** and ^ operators to work with floats

Moderator: GZDoom Developers

Post Reply
User avatar
Gutawer
Posts: 469
Joined: Sat Apr 16, 2016 6:01 am
Preferred Pronouns: She/Her

Expand ZScript ** and ^ operators to work with floats

Post by Gutawer »

So, currently ** and ^ both expect integers on both sides of the operator, would be nice to be able to use these for floats and doubles too.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Expand ZScript ** and ^ operators to work with floats

Post by Graf Zahl »

^ is a binary XOR which is an integer operation.
** does accept floats.
User avatar
Gutawer
Posts: 469
Joined: Sat Apr 16, 2016 6:01 am
Preferred Pronouns: She/Her

Re: Expand ZScript ** and ^ operators to work with floats

Post by Gutawer »

I have no idea how, but I somehow managed to confuse ^ for the power operator, and thought from faulty memory that ** also only accepted ints, my apologies.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”