• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

java centre point (x,y) of line

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java code or formula to find centre point (x,y) of line??

actually i used mid point formula x1,y1

x2,y2 then

i used (x1+x2)/2
(y1+y2)/2
 
rajiv jackz
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
above mid point formula was not working

please anyone help me out here???

i need mathematical formula ???
 
Marshal
Posts: 25594
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have the right formula, provided that (x1, y1) and (x2, y2) were actually the end-points of the line. Perhaps they weren't... we certainly can't determine that by looking at your post. Also read this: ItDoesntWorkIsUseless and then post something which would help us to help you better.
 
I don't get it. A whale wearing overalls? How does that even work? It's like a tiny ad wearing overalls.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic