Absolute value???

Started by
10 comments, last by Noods 21 years, 7 months ago
If you want a real fast abs function, just turn off the sign bit in the internal representation of a double. It''s not portable, it''s obscured, it''s a hack. But this site is about programming games, where speed is a concern most of the time.

Advertisement
quote:Original post by Timkin
Hehe... it''s funny how a person''s background and beliefs affect their answers! I had assumed that since this was a Maths and Physics forum, that Noods wanted the mathematical definition. Alternatively, Paradigm Shifter provided a programming definition, which might have been the first response if the question were asked in the General Progamming forum... both answers are of course valid... it''s just interesting to ponder why we provide the particular answers we do and what influences our thinking!

Cheers,

Timkin


timkin, yeah.. but think about it. other peoples assume its a general math and physics forum and asks questions for example about homework or so. they get closed with the answer if its not a game related math question don''t ask it in here, we''re gamedev, its about math and physicquestions of games.

i''ve seen this a lot of times:D so he bether got a gamedev answer:D else he would have got closed:D

"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

This topic is closed to new replies.

Advertisement