Instance Method

# distance(to:)

Returns the distance from this value to the specified value.

## Parameters

`other`

A value to calculate the distance to.

## Return Value

The distance between this value and `other`.

## Discussion

For two values `x` and `y`, the result of `x.distance(to: y)` is equal to `y - x`—a distance `d` such that `x.advanced(by: d)` approximates `y`. For example:
{"ft_lang_label":"__label__en","ft_lang_prob":0.5246214,"math_prob":0.9955389,"size":362,"snap":"2019-26-2019-30","text_gpt3_token_len":93,"char_repetition_ratio":0.15921788,"word_repetition_ratio":0.0,"special_character_ratio":0.22375691,"punctuation_ratio":0.1,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98998296,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-07-22T06:30:53Z\",\"WARC-Record-ID\":\"<urn:uuid:9bc11911-58de-4843-8ec3-e28f43b51d90>\",\"Content-Length\":\"28318\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:6ea58e08-de03-4705-a0ee-dbff8230e4ca>\",\"WARC-Concurrent-To\":\"<urn:uuid:42952e04-02db-44e4-8064-dfcf8f44fa2f>\",\"WARC-IP-Address\":\"17.253.21.207\",\"WARC-Target-URI\":\"https://developer.apple.com/documentation/swift/float80/1641511-distance?changes=latest_minor\",\"WARC-Payload-Digest\":\"sha1:AXQFIWQ3TIN5VS3NXEEG6EI4PMK6OK24\",\"WARC-Block-Digest\":\"sha1:CIWAVN42BTS6SRGMKFLENB3ZGS2TZNKK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-30/CC-MAIN-2019-30_segments_1563195527531.84_warc_CC-MAIN-20190722051628-20190722073628-00053.warc.gz\"}"}