Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

So, I have a project in school where I have to make a 2 point perspective drawing and give the equations for all the lines. I would like to make a dashed line(we don't have to but I want to), so I was thinking of how to express that and I was thinking how I would do that programming and would express it as

if ((int[x]<x<int[x]+.2)==true)
    draw line

However, as I need to write everything in equations how would this be expressed mathematical notation? Would this simply be expressed as a limit?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

Another fairly common notation is to denote the "fractional part" of a number $x$ as $\{x\}$. If you used this notation, you could say that your condition is simply that $$0 < \{x\} < \frac15.$$ Note that $\{x\}$ is just $x-\lfloor x\rfloor$. So if you don't like $\{x\}$, you could also write your condition as $$0 < x-\lfloor x\rfloor < \frac15.$$

share|improve this answer
1  
Thanks this is perfect and will do exactly what I need to do, and I can't wait to teach my high school math teacher this. Seriously the quality of math help I can get here is 10x higher than from my teacher. Thanks –  Tom Oct 5 '12 at 2:45
    
@Tom You're welcome. I'm glad I could help. –  MJD Oct 5 '12 at 2:47
add comment

your statement of int[x] would look like$\lfloor x \rfloor$ using mathematical notation. Notice that it is not just brackets, but brackets with only the lower portion extended. It denotes the largest integer less than or equal to $x$.

share|improve this answer
    
Thank you, this is what I was looking for, and it tells me what is the proper notation of integers assuming to use that style of determining the integer to use, I just figured I'd let you know the only reason it didn't pick you for the answer is I just find the other answer including the limit examples is highly useful, but you helped me out a lot too. Thanks. –  Tom Oct 5 '12 at 2:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.