Understanding Numeric Mention

Asked 2 years ago, Updated 2 years ago, 74 views

Variable

intf=0;

and

2*f

and

2f

I would like to know the difference between

processing

2022-09-30 19:21

1 Answers

2*f

This means the value (0) of the 2 multiplied variable f, which is essentially 2 x 0 = 0.

2f

This f is a literal representation of Java that indicates float (not related to the variable f).
This means that the number 2 is 2 of float instead of 2 of other types such as int (integer).

Processing float is inherited from Java, so you should refer to Java-related information for more information.


2022-09-30 19:21

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.