lawOfCos: Use the law of sines Use the law of cosines to calculate an...

Description Usage Arguments Value References Examples

Description

Given that A, B, and C are the legs of a triangle solve the the opposite angles

Usage

1
  lawOfCos(A, B, C)

Arguments

A

numeric Length of side A

B

numeric Length of side B

C

numeric Length of side C

Value

list(a=numeric angle opposite A,b=numeric angle opposite B,c=numeric angle opposite C)

References

http://oakroadsystems.com/twt/solving.htm#eq30

Examples

1
2
3
4
5
6
7
lawOfCos(3,4,5)
lawOfCos(3,3,3)
stimsize.val <- 10 #the stimulus size
dist <- 15 #the distance
visangle(10,15)-lawOfCos(stimsize.val,pythag(stimsize.val/2,dist),pythag(stimsize.val/2,dist))$a
offset <- 5
visangle(10,15,5)-lawOfCos(stimsize.val,pythag(stimsize.val/2+offset,dist),pythag(stimsize.val/2-offset,dist))$a

russmisc documentation built on May 2, 2019, 4:44 p.m.