How to multiply the same number or create a multiplier sentence?

Hi;

I am doing a head-tracking device that sends information through OSC messages. The yaw values are too low that I need to multiply the same number x 3 or x4 to be able to rotate the character at greater range.
How I can do to multiply the same number for the times I need to increase the result?

protected void MessageReceivedY(OSCMessage message)
{
if (message.ToFloat(out var value))
{
var euler = _target.eulerAngles;
euler.y = value;

_target.eulerAngles = euler;
}
}

Thanks in advance.

Use the asterisk (*) sign to multiply numbers.
Example: int number = 3 * 4; // 12

You can multiply the value with another number by writing:
value = value * number;

You can also write the exact same line as above in a more clean way which is recommended:
value *= number; // same as value = value * number

Is that what you were struggling with, or did I misunderstand the question?

2 Likes

That is what I was looking for, thank you very much for your help

Glad I could help! Good luck!