What if I only want to go to the 100th decimal point using %?

ajilejay

Veteran
Veteran
Joined
Jul 17, 2013
Messages
64
Reaction score
0
First Language
English
Primarily Uses
For example I want 1%3 to return the value 33
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
Maybe you mean

1 / 3 = 0.33333

If converted to percent it will become 33.33333 %

But you want it become 33 instead?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
For example I want 1%3 to return the value 33
% is the modulo operator (in most programming languages), so 1 % 3 will always return 1 (or 2 % 3 will always return 2, or 4 % 3 will always return 1, to give a few more examples of the modulo operation)

What operation do you want to perfom?

If you wish the division (/) to return a percentage instead of a 0.333, then the correct mathematical would be something like X = ((1/3)*100).to_i

(haven't checked the syntax)

Please tell us what you want, and pleas keep in mind that you cannot redefine operators that are already in use by RGSS - the maximum possible is defining new operators or functions.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top