Math. Ceiling (), math. ceiling

Source: Internet
Author: User

Math. Ceiling (), math. ceiling

Math. Ceiling (Decimal) Returns the smallest integer greater than or equal to the specified decimal number.
Math. Ceiling (Double) Returns the smallest integer greater than or equal to the specified double-precision floating point number.

 

Supported by. NET Compact Framework.

It can be called the ceiling.

It can be used to convert seconds to minutes.

For example, Math. Ceiling (1.1) = 2; Math. Ceiling (1.0) = 1;


SystemMathCeiling (postsTotal/pageSize) ToString ();

The declared type of pageSize and postsTotal is incorrect.
It should be double or decimal.

Bitmap image = new Bitmap (int) MathCeiling (c (checkCodeLength * 95), 22?

I don't know whether it is C # code. If it is:
1. Bitmap image ==> Bitmap * image.

2. Bitmap * image = new Bitmap (int) Math. Ceiling (c (checkCode. Length * 9.5), 22); meaning
Declare the pointer image of a Bitmap object, and use the Bitmap constructor Bimap (int, int) to initialize the object. The two int parameters indicate the width and height of the bitmap respectively.

The width is determined by 9.5 times the Length of the checkCode object; the height is 22.

(Int) Math. Ceiling (c (checkCode. Length * 9.5) is to forcibly convert the double return value of the Math. Ceiling function to the int type.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.