I&C SCI 32 Lecture Notes - Lecture 16: Pythagorean Theorem, Init
Document Summary
# represent points in a two-dimensional space that can report. # their coordinates in both fractional and pixel coordinate. They are created using either a fractional or a. # pixel coordinate system, then can be asked to translate. # the idea is that a point in the fractional system corresponds. # naturally to a point in the pixel system, and vice versa. # so rather than spread the code that performs these conversions. # throughout our program, we"re better off creating a tool to. # text without string objects, but string objects make the job. # easier by providing a variety of useful methods like strip(), # the raw materials to handle coordinate system conversions. # when we wrote this module in lecture, we first decided what we. # wanted to build, by considering how it should work when we. This is how we decided it should work: # >>> p2 = point. from_pixel(400, 600, 800, 800)