World Library  
Flag as Inappropriate
Email this Article

Wrapping (overflow)

Article Id: WHEBN0006703822
Reproduction Date:

Title: Wrapping (overflow)  
Author: World Heritage Encyclopedia
Language: English
Subject: OpenGL
Collection: Computer Arithmetic
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Wrapping (overflow)

In computing, wrapping is when a variable that exceeds its maximum value returns to its minimum value and vice versa. Many high-level programming languages avoid wrapping by giving an arithmetic overflow error if this occurs.

Camera wrapping is a technique often used in video games, which allows a player to move in a straight line and get back to where they started. This was more often used in older games to make it seem that the player is moving up or down an extremely high hill; memory can be saved by using wrapping instead of creating a larger area filled with unpassable walls:

  • With wrapping:
--\  \  \
   \  \  \
    \  \  \--
  • Without wrapping:
--\
   \
    \
     \
      \
       \
        \
         \
          \--

As the diagrams above show, using wrapping will reduce the size of the area needed.

Camera wrapping can also be used to simulate the surface of a cylinder or torus.


This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.