All Content
Blogs
Forums
News
Tutorials
Log In
Sign Up
Login
Username / Email
Password
Remember me
Forgot password?
Login
or
Don't have a GameDev.net account?
Sign up
Forgot your password?
Email Address
Reset Password
Please contact us if you have any trouble resetting your password.
Home
Blogs
Forums
News
Portfolios
Projects
Tutorials
26
users logged in
New?
Learn about game development
.
Before posting, review our
community guidelines
.
Follow Us
Chat in the
GameDev.net Discord!
Mastodon
Back to General and Gameplay Programming
How do i get the fractional part of something in C.
General and Gameplay Programming
Programming
Started by
dampe64
February 09, 2003 07:00 PM
0
comments, last by
dampe64
21 years, 2 months ago
dampe64
122
Author
February 09, 2003 07:00 PM
example: if (fractional part of "my variable" == 0) how would i do that
Cancel
Save
Advertisement
Assassin
246
February 09, 2003 07:19 PM
float var;
...
if (var == (int)(var))
do_stuff;
// or
if (var-((int)var) == 0)
do_stuff;
Cancel
Save
Assassin, aka RedBeard.
andyc.org
This topic is closed to new replies.
Advertisement
Popular Topics
The promise of freedom in story games
Game Design and Theory
Facebook Ads for sales on steam, does it work?
Games Business and Law
New Generated Constructor & JIT Issue
AngelCode
Inheriting from application registered class
AngelCode
Advertisement
Recommended Tutorials
C# Discards: Make It Crystal Clear (C# 7.0)
General and Gameplay Programming
What can you generally find from a city?
Game Design and Theory
Using Blender to Make Game Models Part 1
Visual Arts
Fire
Graphics and GPU Programming
The Physics of Racing, Part 10: Grip Angle
Math and Physics
Reticulating splines
About GameDev.net
Community Guidelines
Terms of Service
Privacy Policy
Contact Us
Copyright (c) 1999-2024 GameDev.net, LLC
Back to Top