Scratch for Java

Sprite::distanceToSprite()

Calculates the Euclidean distance between this sprite and another sprite.

Examples

View on GitHub

Syntax

Java

.distanceToSprite(sprite)

Scratch

(distance to [sprite v])

Parameters

Name Data Type Description
sprite Sprite the other sprite to which the distance is calculated

Return

double

distanceToSprite()

Create Shareable URL

Select Sections