TAILIEUCHUNG - Manipulating Numerical Data Using Math

Sử dụng thao tác dữ liệu Numerical Toán Trước đó trong bài học này, chúng tôi giới thiệu bạn để người điều khiển số, trong đó thực hiện các phép tính số học đơn giản trong cách nói của bạn. Toán lớp của Flash cho phép bạn truy cập vào một loạt các phương pháp hữu ích cho thao tác thêm số | Manipulating Numerical Data Using Math Earlier in this lesson we introduced you to the numeric operators which perform simple arithmetic in your expressions. Flash s Math class allows you to access a variety of useful methods for further manipulating numbers. We ll introduce a few of the most commonly used methods of the Math class here. You ll use many of the other methods in other lessons in this book. Common methods of the Math class include The absolute-value method is used to return the scalar positive value of a number. For example var distance Number here - there If subtracting the value of there from here results in a negative value for example -375 the method will convert it to a positive value for example 375 ensuring a positive result. The round method accepts a number as a parameter and returns an integer. If the digit in the tenth placeholder of the number is 5 or greater the number is rounded to the next highest integer if it s less than 5 it s rounded to the next lowest integer. For example var cupsOfCoffee Number Because 7 is greater than or equal to 5 this number is rounded up to the next highest integer 4. This method works like except that it always rounds down to the next lowest integer. This method works like except that it always rounds up to the next highest integer. The square-root method accepts a positive number as an argument and returns the square root of that number. For example var answer Number 9 answer is assigned a value of 3. In this exercise using operators expressions and Math class methods you will write a simple algorithm that will convert Fahrenheit temperatures to Celsius. You will also program a thermometer to display the correct mercury level. 1. Open in the Lesson06 Assets folder. All of the symbols and text fields have been created and are on the stage so that we can focus on ActionScript.

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.