MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / cos

Method cos

src/org/opensourcephysics/media/core/TPoint.java:560–562  ·  view source on GitHub ↗

Returns the cosine of the angle measured ccw from the positive x-axis to the line between this TPoint and the specified coordinates. @param x the x coordinate @param y the x coordinate @return the cosine of the angle

(double x, double y)

Source from the content-addressed store, hash-verified

558 * @return the cosine of the angle
559 */
560 public double cos(double x, double y) {
561 return (x - getX()) / distance(x, y);
562 }
563
564 /**
565 * Returns the cosine of the angle measured ccw from the positive x-axis to the

Callers 15

mainMethod · 0.45
Demo3D_3AppMethod · 0.45
mainMethod · 0.45
moveElectronsMethod · 0.45
setFrameAngleMethod · 0.45
getMatchLocationMethod · 0.45
setAngleMethod · 0.45
setAllAnglesMethod · 0.45
updateFactorsMethod · 0.45
setXYMethod · 0.45
builtInFunctionMethod · 0.45
drawMethod · 0.45

Calls 1

getXMethod · 0.65

Tested by 3

mathMethod · 0.36
applyAsDoubleMethod · 0.36