PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, December 12, 2022

[FIXED] What does %% mean?

 December 12, 2022     r, syntax     No comments   

Issue

From the question you can probably tell that I don't know much about code! My question is this:

What does this code mean?

mnlong <- 280.460 + .9856474 * time
mnlong <- mnlong %% 360
mnlong[mnlong < 0] <- mnlong[mnlong < 0] + 360

I understand that the mnlong and time are variables but the %% confuses me.

Could someone give me a basic description?


Solution

It's most likely that %% means integer division by modulo - the result is within 0..360 range. It's used for cases when some value can't get out of some reasonable range like longitute fo example that can be only within 0..360 degrees.



Answered By - sharptooth
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing