c# mathf.ceiling
//C#
Math.Ceiling(value);
//Unity C#
Mathf.Ceil(10.0f);
c# mathf.ceiling
//C#
Math.Ceiling(value);
//Unity C#
Mathf.Ceil(10.0f);
math.ceiling
//Math.ceil is Javascript, and rounds number up:
let someNum = 0.001;
console.log(Math.ceil(someNum)); //prints 1
/*Note: Math.ceil ceil is lowercase, whereas Math.Ceiling Ceiling
is uppercase*/
/*Math.Ceiling is C#, and does the same as Math.ceil, but requires
a decimal or double: */
decimal someDecimal = 2.32m;
Console.WriteLine(Math.Ceiling(someDecimal)); //prints 3
double someDouble = 1.5;
Console.WriteLine(Math.Ceiling(someDouble)); //prints 2
//Sorry for any gramatical issues!
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us