{"id":2102,"date":"2019-04-03T13:00:02","date_gmt":"2019-04-03T12:00:02","guid":{"rendered":"https:\/\/chewett.co.uk\/blog\/?p=2102"},"modified":"2019-04-28T18:18:07","modified_gmt":"2019-04-28T17:18:07","slug":"checking-if-two-points-are-closer-than-a-distance","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/2102\/checking-if-two-points-are-closer-than-a-distance\/","title":{"rendered":"Checking if two points are closer than a distance"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"254\" data-attachment-id=\"2116\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/2102\/checking-if-two-points-are-closer-than-a-distance\/two_points_closer_distance\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/two_points_closer_distance.jpg?fit=800%2C300&amp;ssl=1\" data-orig-size=\"800,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"two_points_closer_distance\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/two_points_closer_distance.jpg?fit=300%2C113&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/two_points_closer_distance.jpg?fit=678%2C254&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/two_points_closer_distance.jpg?resize=678%2C254&#038;ssl=1\" alt=\"\" class=\"wp-image-2116\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/two_points_closer_distance.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/two_points_closer_distance.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/two_points_closer_distance.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/two_points_closer_distance.jpg?resize=50%2C19&amp;ssl=1 50w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/figure>\n\n\n\n<p>This blog post talks about how you can quickly check if two point are closer than a specific distance.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">How to calculate the distance between two points<\/h2>\n\n\n\n<p>To calculate the distance between two points you can use Pythagoras Theorem.<\/p>\n\n\n\n<p>This states that for a right angled triangle you can find the distance of the longest side, by summing the square of the horizontal and vertical sides and then taking the square root.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"287\" height=\"253\" data-attachment-id=\"2105\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/2102\/checking-if-two-points-are-closer-than-a-distance\/pythag\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag.jpg?fit=287%2C253&amp;ssl=1\" data-orig-size=\"287,253\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pythag\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag.jpg?fit=287%2C253&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag.jpg?fit=287%2C253&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag.jpg?resize=287%2C253&#038;ssl=1\" alt=\"\" class=\"wp-image-2105\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag.jpg?w=287&amp;ssl=1 287w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag.jpg?resize=50%2C44&amp;ssl=1 50w\" sizes=\"auto, (max-width: 287px) 100vw, 287px\" \/><\/figure><\/div>\n\n\n\n<p>If two points have an x and y position you can use this formula to calculate the distance between them. Once you know the distance its a simple comparison between your and the calculated distance.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"296\" data-attachment-id=\"2104\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/2102\/checking-if-two-points-are-closer-than-a-distance\/pythag_coords\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag_coords.jpg?fit=611%2C296&amp;ssl=1\" data-orig-size=\"611,296\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pythag_coords\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag_coords.jpg?fit=300%2C145&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag_coords.jpg?fit=611%2C296&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag_coords.jpg?resize=611%2C296&#038;ssl=1\" alt=\"\" class=\"wp-image-2104\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag_coords.jpg?w=611&amp;ssl=1 611w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag_coords.jpg?resize=300%2C145&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/pythag_coords.jpg?resize=50%2C24&amp;ssl=1 50w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/figure>\n\n\n\n<p>Applying this principle to our two points, we arrive at  the above formulae. In JavaScript this distance can be calculated as.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nMath.sqrt(Math.pow(x1 - x2, 2) + Math.pow((y1 - y2), 2))\n<\/pre><\/div>\n\n\n<p>Once you know the distance, you can quickly work out if the two points are closer than a value.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nreturn distance &gt; Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow((y1 - y2), 2))\n<\/pre><\/div>\n\n\n<p>This will return true if the two points are closer than the given distance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Optimising this by removing the square root<\/h2>\n\n\n\n<p>Currently this algorithm requires performing the following mathematical operations:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>2x power of two<\/li><li>1x addition<\/li><li>1x square root<\/li><li>1x comparison<\/li><\/ul>\n\n\n\n<p>We can change it to instead of performing a square root, perform an additional power of two calculation. Typically this will be faster than the square root. This changes the maths to the following algorithm.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nreturn Math.pow(distance, 2) &gt; (Math.pow(x1 - x2, 2) + Math.pow((y1 - y2), 2))\n<\/pre><\/div>\n\n\n<p>Instead of performing the square root and comparing it, you square the distance and compare the two.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Speeding it up for cases where the two points are far away<\/h2>\n\n\n\n<p>The complexity of the above algorithm is that the two points are not always on the same x or y axis. This means you need to calculate the diagonal distance between the two using the above algorithm.<\/p>\n\n\n\n<p>However, if you know that the difference between either the x or y axis points is larger than the the distance you are checking then it will always be further away than the search distance.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"586\" height=\"449\" data-attachment-id=\"2110\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/2102\/checking-if-two-points-are-closer-than-a-distance\/speeding_up_calculations\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/speeding_up_calculations.jpg?fit=586%2C449&amp;ssl=1\" data-orig-size=\"586,449\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"speeding_up_calculations\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/speeding_up_calculations.jpg?fit=300%2C230&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/speeding_up_calculations.jpg?fit=586%2C449&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/speeding_up_calculations.jpg?resize=586%2C449&#038;ssl=1\" alt=\"\" class=\"wp-image-2110\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/speeding_up_calculations.jpg?w=586&amp;ssl=1 586w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/speeding_up_calculations.jpg?resize=300%2C230&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/speeding_up_calculations.jpg?resize=50%2C38&amp;ssl=1 50w\" sizes=\"auto, (max-width: 586px) 100vw, 586px\" \/><\/figure><\/div>\n\n\n\n<p>Above is a diagram which shows this principle. Inside the green circle are all points where the central point is closer than the search distance. The red area is all points within the distance in either the x or y axis.<\/p>\n\n\n\n<p>All points outside the red square are those which have an x or y difference  <br>greater than our search distance. To check if it is outside the square we can run the following check:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nif(Math.abs(x1 - x2) &gt; r || Math.abs(y1 - y2) &gt; r) {\n    return false;\n}\n<\/pre><\/div>\n\n\n<p>Here, if the absolute distance between the x or y points is greater than r, our search distance, the points must be further away than r.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Putting this all together<\/h2>\n\n\n\n<p>If you combine all of these you get a relatively efficient algorithm for checking if two points are closer than a specific distance.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nfunction arePointsCloserThanR(x1, y1, x2, y2, r) {\n    \/\/Shortcut for the maths. This creates a box region where we know anything\n    \/\/ that lies outside the box definitely isn&#039;t closer than R. If this\n    \/\/is true then return false and we don&#039;t have to do complex (slow) maths.\n    if(Math.abs(x1 - x2) &gt; r || Math.abs(y1 - y2) &gt; r) {\n        return false;\n    }\n\n    \/\/We need to do maths, Lets cheat and square R instead of a slower sqrt\n    var rSquared = Math.pow(r, 2);\n\n    \/\/If R Squared is bigger then the two distances squared, then return\n    \/\/ true as the points are closer\n    return rSquared &gt; (Math.pow(x1 - x2, 2) + Math.pow((y1 - y2), 2));\n}\n<\/pre><\/div>\n\n\n<p>Here we first perform the box check, which will remove the need for performing the more complex power operation in some cases. If this determines the second point might be within the search distance we use Pythagoras theorem to calculate the distance and compare it. This uses the distance squared, rather than using square root for performance reasons.<\/p>\n\n\n\n<p>I used this code in my <a href=\"https:\/\/chewett.co.uk\/blog\/2080\/visualising-herd-immunity-with-vaccinations-using-d3-js\/\">D3.js Herd Immunity and Vaccination visualisation<\/a> to calculate if two people were close enough to pass an infection.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog post talks about how you can quickly check if two point are closer than a specific distance.<\/p>\n","protected":false},"author":1,"featured_media":2115,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Today I talk about the maths I use in my #D3js Herd Immunity #visualisation to check if two points are closer than a distance","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[98],"tags":[339,229,219,338],"class_list":["post-2102","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-2d-points","tag-d3-js","tag-data-visualisation","tag-distance"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/two_points_closer_distance-1.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-xU","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2168,"url":"https:\/\/chewett.co.uk\/blog\/2168\/improving-closeness-algorithm-by-precomputing-r\/","url_meta":{"origin":2102,"position":0},"title":"Improving Closeness algorithm by precomputing R","author":"Chewett","date":"April 27, 2019","format":false,"excerpt":"This post is a continuation of a previous post where I talked about how you can check if two points are closer than a distance. This improves it by adding the possibility to precompute R. Why precompute R As discussed in the previous post one of the slowest parts of\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/04\/improving_closeness_algo.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/04\/improving_closeness_algo.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/04\/improving_closeness_algo.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/04\/improving_closeness_algo.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1759,"url":"https:\/\/chewett.co.uk\/blog\/1759\/pokemon-go-api-buddy-candy-distances\/","url_meta":{"origin":2102,"position":1},"title":"Pokemon Go API &#8211; Buddy Candy Distances","author":"Chewett","date":"November 28, 2018","format":false,"excerpt":"This post talks about the newest Pokemon Go API, the Buddy Candy Distances API at\u00a0pogoapi.net. Pokemon Buddy Candy Distances When you make a Pokemon your buddy, after a certain distance walked with them you will get 1 candy from them. This distance depends on the specific Pokemon. The current buddy\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/pogo_api_buddy_distances.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/pogo_api_buddy_distances.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/pogo_api_buddy_distances.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/pogo_api_buddy_distances.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2294,"url":"https:\/\/chewett.co.uk\/blog\/2294\/implementing-the-perforce-helix-in-d3-js\/","url_meta":{"origin":2102,"position":2},"title":"Implementing the Perforce Helix in D3.js","author":"Chewett","date":"July 27, 2019","format":false,"excerpt":"This blog post talks about the steps I took to implement the Perforce helix in D3.js. What is the Perforce Helix? Perforce is a company that makes a version control system of the same name. One of their main products has been recently renamed Perforce Helix Core. Lately on their\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/07\/d3_perforce_helix-2.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/07\/d3_perforce_helix-2.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/07\/d3_perforce_helix-2.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/07\/d3_perforce_helix-2.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1808,"url":"https:\/\/chewett.co.uk\/blog\/1808\/pokemon-go-api-pokemon-rarity-api\/","url_meta":{"origin":2102,"position":3},"title":"Pokemon Go API \u2013 Pokemon Rarity API","author":"Chewett","date":"February 23, 2019","format":false,"excerpt":"This post talks about the newest Pokemon Go API, the Pokemon Rarity API at\u00a0pogoapi.net. Pokemon Rarity Information Pokemon are split up into 3 rarity types. These are Standard, Legendary, and Mythic. Typically Legendary and Mythic Pokemon have different trading rules along with a much higher buddy walking distance. Since Legendary\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/pogo_api_pokemon_rarity-1.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/pogo_api_pokemon_rarity-1.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/pogo_api_pokemon_rarity-1.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/pogo_api_pokemon_rarity-1.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2581,"url":"https:\/\/chewett.co.uk\/blog\/2581\/pokemon-go-api-pokemon-evolutions-api\/","url_meta":{"origin":2102,"position":4},"title":"Pokemon Go API &#8211; Pokemon Evolutions API","author":"Chewett","date":"July 25, 2020","format":false,"excerpt":"This post talks about the latest API I have added to PoGoAPI.net, the Pokemon Evolutions API. What the Pokemon Evolutions API can be used for Some Pokemon can evolve into a stronger form by feeding them candy or meeting certain conditions. Once these conditions have been met you can press\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/07\/pogo_api_evolution_posticon.jpg?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/07\/pogo_api_evolution_posticon.jpg?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/07\/pogo_api_evolution_posticon.jpg?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/07\/pogo_api_evolution_posticon.jpg?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/07\/pogo_api_evolution_posticon.jpg?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1061,"url":"https:\/\/chewett.co.uk\/blog\/1061\/fixing-slow-jittery-jumping-mouse-in-awesomenauts\/","url_meta":{"origin":2102,"position":5},"title":"Fixing slow jittery jumping mouse in Awesomenauts","author":"Chewett","date":"March 14, 2018","format":false,"excerpt":"This blog post describes how you can fix a slow jittery jumping mouse in Awesomenauts. What is happening to the mouse? The main issue occurring is the mouse moving very slowly on the main screen. After a short time it will jump across the screen very fast. This will make\u2026","rel":"","context":"In &quot;Fixes&quot;","block_context":{"text":"Fixes","link":"https:\/\/chewett.co.uk\/blog\/category\/fixes\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/03\/awesomenauts_jittery_mouse.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/03\/awesomenauts_jittery_mouse.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/03\/awesomenauts_jittery_mouse.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/03\/awesomenauts_jittery_mouse.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=2102"}],"version-history":[{"count":12,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2102\/revisions"}],"predecessor-version":[{"id":2172,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2102\/revisions\/2172"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/2115"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=2102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=2102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=2102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}